model

package
v0.0.0-...-5f04626 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Docker BuildOutput = iota
	Helm
	Debian
	Rpm
	Archive
	Grafana
	Scanner

	// Deps will resolve by looking at the istio.deps file in istio/istio
	Deps string = "deps"
	// Modules will resolve by looking at the go.mod file in istio/istio
	Modules string = "modules"
	// ProxyWorkspace will resolve by looking at the WORKSPACE file in istio/proxy.
	// This should only be used to resolve Envoy dep SHA.
	ProxyWorkspace string = "proxy_workspace"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoDependency

type AutoDependency string

type BuildOutput

type BuildOutput int

type Dependency

type Dependency struct {
	// Git repository to pull from. Required if branch or sha is set
	Git string `json:"git,omitempty"`
	// Checkout the git branch
	Branch string `json:"branch,omitempty"`
	// Checkout the git SHA
	Sha string `json:"sha,omitempty"`
	// Copy the local path. Note this still needs to be a git repo.
	LocalPath string `json:"localpath,omitempty"`
	// Auto will fetch the SHA to use based on other repos. Currently this supports reading
	// istio.deps from istio/istio only.
	Auto string `json:"auto,omitempty"`
	// If true, go version semantic will be used for tagging the git repo, e.g. v1.2.3.
	GoVersionEnabled bool `json:"goversionenabled,omitempty"`
}

Dependency defines a git dependency for the build

func (Dependency) Ref

func (d Dependency) Ref() string

Ref returns the git reference of a dependency.

type DockerOutput

type DockerOutput string
const (
	// DockerOutputTar outputs docker images to tar files on disk
	DockerOutputTar DockerOutput = "tar"
	// DockerOutputContext loads docker images into the local docker context
	DockerOutputContext DockerOutput = "context"
)

type InputManifest

type InputManifest struct {
	// Dependencies declares all git repositories used to build this release
	Dependencies IstioDependencies `json:"dependencies"`
	// Version specifies what version of Istio this release is
	Version string `json:"version"`
	// Docker specifies the docker hub to use in the helm charts.
	Docker string `json:"docker"`
	// DockerOutput specifies where docker images are written.
	DockerOutput DockerOutput `json:"dockerOutput"`
	// Architectures defines the architectures to build for.
	// Note: this impacts only docker and deb/rpm; istioctl is always built in additional platforms.
	// Example: []string{"linux/amd64", "linux/arm64"}.
	Architectures []string `json:"architectures"`
	// Directory defines the base working directory for the release.
	// This is excluded from the final serialization
	Directory string `json:"directory"`
	// ProxyOverride specifies a URL to an Envoy binary to use instead of the default proxy
	// The binary will be pulled from `$proxyOverride/envoy-alpha-SHA.tar.gz`
	ProxyOverride string `json:"proxyOverride"`
	// BuildOutputs defines what components to build. This allows building only some components.
	BuildOutputs []string `json:"outputs"`
	// GrafanaDashboards defines a mapping of dashboard name -> ID of the dashboard on grafana.com
	GrafanaDashboards map[string]int `json:"dashboards"`
	// BillOfMaterials flag determines if a Bill of Materials should be produced
	// by the build.
	SkipGenerateBillOfMaterials bool `json:"skipGenerateBillOfMaterials"`
}

Manifest defines what is in a release

type IstioDep

type IstioDep struct {
	Comment       string `json:"_comment,omitempty"`
	Name          string `json:"name,omitempty"`
	RepoName      string `json:"repoName,omitempty"`
	LastStableSHA string `json:"lastStableSHA,omitempty"`
}

IstioDep identifies a external dependency of Istio.

type IstioDependencies

type IstioDependencies struct {
	Istio          *Dependency `json:"istio"`
	Api            *Dependency `json:"api"` //nolint: revive, stylecheck
	Proxy          *Dependency `json:"proxy"`
	Ztunnel        *Dependency `json:"ztunnel"`
	ClientGo       *Dependency `json:"client-go"`
	TestInfra      *Dependency `json:"test-infra"`
	Tools          *Dependency `json:"tools"`
	Envoy          *Dependency `json:"envoy"`
	Enhancements   *Dependency `json:"enhancements"`
	ReleaseBuilder *Dependency `json:"release-builder"`
	CommonFiles    *Dependency `json:"common-files"`
}

Dependencies for the build

func (*IstioDependencies) Get

func (i *IstioDependencies) Get() map[string]*Dependency

func (IstioDependencies) MarshalJSON

func (i IstioDependencies) MarshalJSON() ([]byte, error)

MarshalJSON writes the dependencies, exposing just the SHA

func (*IstioDependencies) Set

func (i *IstioDependencies) Set(repo string, dependency Dependency)

type Manifest

type Manifest struct {
	// Dependencies declares all git repositories used to build this release
	Dependencies IstioDependencies `json:"dependencies"`
	// Version specifies what version of Istio this release is
	Version string `json:"version"`
	// Docker specifies the docker hub to use in the helm charts.
	Docker string `json:"docker"`
	// DockerOutput specifies where docker images are written.
	DockerOutput DockerOutput `json:"dockerOutput"`
	// Architectures defines the architectures to build for.
	// Note: this impacts only docker and deb/rpm; istioctl is always built in additional platforms.
	// Example: []string{"linux/amd64", "linux/arm64"}.
	Architectures []string `json:"architectures"`
	// Directory defines the base working directory for the release.
	// This is excluded from the final serialization
	Directory string `json:"-"`
	// ProxyOverride specifies a URL to an Envoy binary to use instead of the default proxy
	// The binary will be pulled from `$proxyOverride/envoy-alpha-SHA.tar.gz`
	ProxyOverride string `json:"-"`
	// BuildOutputs defines what components to build. This allows building only some components.
	BuildOutputs map[BuildOutput]struct{} `json:"-"`
	// GrafanaDashboards defines a mapping of dashboard name -> ID of the dashboard on grafana.com
	// Note: this tool is not yet smart enough to create dashboards that do not already exist, it can only update dashboards.
	GrafanaDashboards map[string]int `json:"dashboards"`
	// BillOfMaterials flag determines if a Bill of Materials should be produced
	// by the build.
	SkipGenerateBillOfMaterials bool `json:"skipGenerateBillOfMaterials"`
}

Manifest defines what is in a release

func (Manifest) GoOutDir

func (m Manifest) GoOutDir() string

GoOutDir is a helper to return the directory of Istio build output

func (Manifest) OutDir

func (m Manifest) OutDir() string

OutDir is a help to return the out directory

func (Manifest) RepoArchOutDir

func (m Manifest) RepoArchOutDir(repo string, arch string) string

RepoOutDir is a helper to return the directory of Istio build arch output for repos the place outputs inside the repo

func (Manifest) RepoDir

func (m Manifest) RepoDir(repo string) string

RepoDir is a helper to return the working directory for a repo

func (Manifest) RepoOutDir

func (m Manifest) RepoOutDir(repo string) string

RepoOutDir is a helper to return the directory of Istio build output for repos the place outputs inside the repo

func (Manifest) SourceDir

func (m Manifest) SourceDir() string

SourceDir is a help to return the sources directory

func (Manifest) WorkDir

func (m Manifest) WorkDir() string

WorkDir is a help to return the work directory

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL