View Source
const (
	// YAMLSeparator is a separator for multi-document YAML files.
	YAMLSeparator = "\n---\n"

	// DefaultProfileString is the name of the default profile.
	DefaultProfileString = "default"

	// NotesFileNameSuffix is the file name suffix for helm notes.
	// see
	NotesFileNameSuffix = ".txt"
View Source
const (
	// DefaultProfileFilename is the name of the default profile yaml file.
	DefaultProfileFilename = "default.yaml"
	ChartsSubdirName       = "charts"
View Source
const (
	// InstallationDirectory is temporary folder name for caching downloaded installation packages.
	InstallationDirectory = "istio-install-packages"
	// OperatorSubdirFilePath is file path of installation packages to helm charts.
	OperatorSubdirFilePath = "manifests"
	// OperatorSubdirFilePath15 is the file path of installation packages to helm charts for 1.5 and earlier.
	// TODO: remove in 1.7.
	OperatorSubdirFilePath15 = "install/kubernetes/operator"


This section is empty.


func DefaultFilenameForProfile

func DefaultFilenameForProfile(profile string) string

    DefaultFilenameForProfile returns the profile name of the default profile for the given profile.

    func DownloadTo

    func DownloadTo(srcURL, dest string) (string, error)

      DownloadTo downloads from remote srcURL to dest local file path

      func GenerateHubTagOverlay

      func GenerateHubTagOverlay(hub, tag string) (string, error)

        GenerateHubTagOverlay creates an IstioOperatorSpec overlay YAML for hub and tag.

        func GetFilesRecursive

        func GetFilesRecursive(f fs.FS, root string) ([]string, error)

        func GetProfileYAML

        func GetProfileYAML(installPackagePath, profileOrPath string) (string, error)

          GetProfileYAML returns the YAML for the given profile name, using the given profileOrPath string, which may be either a profile label or a file path.

          func IsDefaultProfile

          func IsDefaultProfile(profile string) bool

            IsDefaultProfile reports whether the given profile is the default profile.

            func ListProfiles

            func ListProfiles(charts string) ([]string, error)

              list all the profiles.

              func LoadValues

              func LoadValues(profileName string, chartsDir string) (string, error)

              func ReadProfileYAML

              func ReadProfileYAML(profile, manifestsPath string) (string, error)

                ReadProfileYAML reads the YAML values associated with the given profile. It uses an appropriate reader for the profile format (compiled-in, file, HTTP, etc.).

                func URLToDirname

                func URLToDirname(url string) (string, *version.Version, error)

                  URLToDirname, given an input URL pointing to an Istio release tar, returns the subdirectory name that the tar would be extracted to and the version in the URL. The input URLs are expected to have the form https://.../istio-{version}-{platform}[optional suffix].tar.gz.


                  type Renderer

                  type Renderer struct {
                  	// contains filtered or unexported fields

                    Renderer is a helm template renderer for a fs.FS.

                    func NewGenericRenderer

                    func NewGenericRenderer(files fs.FS, dir, componentName, namespace string) *Renderer

                      NewFileTemplateRenderer creates a TemplateRenderer with the given parameters and returns a pointer to it. helmChartDirPath must be an absolute file path to the root of the helm charts.

                      func (*Renderer) RenderManifest

                      func (h *Renderer) RenderManifest(values string) (string, error)

                        RenderManifest renders the current helm templates with the current values and returns the resulting YAML manifest string.

                        func (*Renderer) RenderManifestFiltered

                        func (h *Renderer) RenderManifestFiltered(values string, filter TemplateFilterFunc) (string, error)

                          RenderManifestFiltered filters templates to render using the supplied filter function.

                          func (*Renderer) Run

                          func (h *Renderer) Run() error

                            Run implements the TemplateRenderer interface.

                            type TemplateFilterFunc

                            type TemplateFilterFunc func(string) bool

                              TemplateFilterFunc filters templates to render by their file name

                              type TemplateRenderer

                              type TemplateRenderer interface {
                              	// Run starts the renderer and should be called before using it.
                              	Run() error
                              	// RenderManifest renders the associated helm charts with the given values YAML string and returns the resulting
                              	// string.
                              	RenderManifest(values string) (string, error)
                              	// RenderManifestFiltered filters manifests to render by template file name
                              	RenderManifestFiltered(values string, filter TemplateFilterFunc) (string, error)

                                TemplateRenderer defines a helm template renderer interface.

                                func NewHelmRenderer

                                func NewHelmRenderer(operatorDataDir, helmSubdir, componentName, namespace string) TemplateRenderer

                                  NewHelmRenderer creates a new helm renderer with the given parameters and returns an interface to it. The format of helmBaseDir and profile strings determines the type of helm renderer returned (compiled-in, file, HTTP etc.)

                                  type URLFetcher

                                  type URLFetcher struct {
                                  	// contains filtered or unexported fields

                                    URLFetcher is used to fetch and manipulate charts from remote url

                                    func NewURLFetcher

                                    func NewURLFetcher(url string, destDirRoot string) *URLFetcher

                                      NewURLFetcher creates an URLFetcher pointing to installation package URL and destination dir to extract it into, and returns a pointer to it. url is the source URL where release tar is downloaded from. It should be in the form https://.../istio-{version}-{platform}.tar.gz i.e. the full URL path to the Istio release tar. destDirRoot is the root dir where charts are downloaded and extracted. If set to "", the destination dir will be set to the default value, which is static for caching purposes.

                                      func (*URLFetcher) DestDir

                                      func (f *URLFetcher) DestDir() string

                                        DestDir returns path of destination dir that the tar was extracted to.

                                        func (*URLFetcher) Fetch

                                        func (f *URLFetcher) Fetch() error

                                          Fetch fetches and untars the charts.