manifest

package
v0.0.0-...-1832b01 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 25 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenIOPFromProfile

func GenIOPFromProfile(profileOrPath, fileOverlayYAML string, setFlags []string, skipValidation, allowUnknownField bool,
	client kube.Client, l clog.Logger,
) (string, *iopv1alpha1.IstioOperator, error)

GenIOPFromProfile generates an IstioOperator from the given profile name or path, and overlay YAMLs from user files and the --set flag. If successful, it returns an IstioOperator string and struct.

func GenManifests

func GenManifests(inFilename []string, setFlags []string, force bool, filter []string,
	client kube.Client, l clog.Logger,
) (name.ManifestMap, *iopv1alpha1.IstioOperator, error)

GenManifests generates a manifest map, keyed by the component name, from input file list and a YAML tree representation of path-values passed through the --set flag. If force is set, validation errors will not cause processing to abort but will result in warnings going to the supplied logger.

func GenerateConfig

func GenerateConfig(inFilenames []string, setFlags []string, force bool, client kube.Client,
	l clog.Logger,
) (string, *iopv1alpha1.IstioOperator, error)

GenerateConfig creates an IstioOperatorSpec from the following sources, overlaid sequentially: 1. Compiled in base, or optionally base from paths pointing to one or multiple ICP/IOP files at inFilenames. 2. Profile overlay, if non-default overlay is selected. This also comes either from compiled in or path specified in IOP contained in inFilenames. 3. User overlays stored in inFilenames. 4. setOverlayYAML, which comes from --set flag passed to manifest command.

Note that the user overlay at inFilenames can optionally contain a file path to a set of profiles different from the ones that are compiled in. If it does, the starting point will be the base and profile YAMLs at that file path. Otherwise it will be the compiled in profile YAMLs. In step 3, the remaining fields in the same user overlay are applied on the resulting profile base. The force flag causes validation errors not to abort but only emit log/console warnings.

func GetMergedIOP

func GetMergedIOP(userIOPStr, profile, manifestsPath, revision string, client kube.Client,
	logger clog.Logger,
) (*iopv1alpha1.IstioOperator, error)

func GetProfile

func GetProfile(iop *iopv1alpha1.IstioOperator) string

func GetValueForSetFlag

func GetValueForSetFlag(setFlags []string, path string) string

GetValueForSetFlag parses the passed set flags which have format key=value and if any set the given path, returns the corresponding value, otherwise returns the empty string. setFlags must have valid format.

func OverlayYAMLStrings

func OverlayYAMLStrings(profile string, fy string,
	setFlags []string, force bool, client kube.Client, l clog.Logger,
) (string, *iopv1alpha1.IstioOperator, error)

func ParseYAMLFiles

func ParseYAMLFiles(inFilenames []string, force bool, l clog.Logger) (overlayYAML string, profile string, err error)

ParseYAMLFiles parses the given slice of filenames containing YAML and merges them into a single IstioOperator format YAML strings. It returns the overlay YAML, the profile name and error result.

func ReadLayeredYAMLs

func ReadLayeredYAMLs(filenames []string) (string, error)

func ReadYamlProfile

func ReadYamlProfile(inFilenames []string, setFlags []string, force bool, l clog.Logger) (string, string, error)

ReadYamlProfile gets the overlay yaml file from list of files and return profile value from file overlay and set overlay.

Types

This section is empty.

Jump to

Keyboard shortcuts

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