Documentation ¶
Index ¶
- Constants
- Variables
- func ApplyLayers(ctx context.Context, inputs ValuesInputs, installedFlavor *hubv1.Flavor, ...) (kuberesource.UnstructuredResources, error)
- func CoalesceValuesMap(ctx context.Context, initial map[string]interface{}, ...) map[string]interface{}
- func ComputeResourcesForApplication(ctx context.Context, inputs ValuesInputs, spec *hubv1.VersionedApplicationSpec) (kuberesource.UnstructuredResources, error)
- func ComputeValueOverrides(ctx context.Context, inputs ValuesInputs) (string, error)
- func ConvertNestedMapToYaml(nestedMap map[string]interface{}) (string, error)
- func ConvertParamsToNestedMap(params map[string]string) (map[string]interface{}, error)
- func ConvertYamlStringToNestedMap(yamlString string) (map[string]interface{}, error)
- func FilterByLabel(ctx context.Context, spec *hubv1.VersionedApplicationSpec, ...) kuberesource.UnstructuredResources
- func GetInstalledFlavor(name string, flavors []*v1.Flavor) (*v1.Flavor, error)
- func GetManifestsFromApplicationSpec(ctx context.Context, inputs ValuesInputs, spec *hubv1.VersionedApplicationSpec) (helmchart.Manifests, error)
- func GetResourcesFromManifests(ctx context.Context, manifests helmchart.Manifests) (kuberesource.UnstructuredResources, error)
- func YamlToResources(yamlBytes []byte) (kuberesource.UnstructuredResources, error)
- type SuperglooInfo
- type ValuesInputs
Constants ¶
View Source
const InstallationStepLabel = "service-mesh-hub.solo.io/installation_step"
Variables ¶
View Source
var ( NilFlavorError = errors.Errorf("flavor name cannot be nil") ExpectedAtMostError = func(item string, desired, found int) error { return errors.Errorf("expected at most %d %s, found %d", desired, item, found) } NoFlavorFoundError = func(name string) error { return errors.Errorf("could not find flavor with name: %s", name) } )
View Source
var ( UnknownLayerTypeError = func(layer *hubv1.Layer) error { return errors.Errorf("unknown layer type specified %T", layer.GetType()) } FailedToCalculateValues = func(err error) error { return errors.Wrapf(err, "failed to calculate values for layer rendering") } )
View Source
var ( MissingInstallSpecError = errors.Errorf("missing installation spec") FailedToRenderManifestsError = func(err error) error { return errors.Wrapf(err, "error rendering manifests") } FailedToConvertManifestsError = func(err error) error { return errors.Wrapf(err, "error converting manifests to raw resources") } FailedRenderValueTemplatesError = func(err error) error { return errors.Wrapf(err, "error rendering input value templates") } )
View Source
var ( UnableToParseParameterError = func(err error, key, value string) error { return errors.Wrapf(err, "Unable to parse parameter with key '%s' and value '%s'", key, value) } UnableToParseYamlError = func(err error, input string) error { return errors.Wrapf(err, "Unable to parse yaml string: %s", input) } UnableToMarshalYamlError = func(err error, input map[string]interface{}) error { return errors.Wrapf(err, "Unable to marshal map to yaml: %v", input) } )
Functions ¶
func ApplyLayers ¶
func ApplyLayers(ctx context.Context, inputs ValuesInputs, installedFlavor *hubv1.Flavor, manifests helmchart.Manifests) (kuberesource.UnstructuredResources, error)
func CoalesceValuesMap ¶
func ComputeResourcesForApplication ¶
func ComputeResourcesForApplication(ctx context.Context, inputs ValuesInputs, spec *hubv1.VersionedApplicationSpec) (kuberesource.UnstructuredResources, error)
func ComputeValueOverrides ¶
func ComputeValueOverrides(ctx context.Context, inputs ValuesInputs) (string, error)
Coalesces spec values yaml, params, and user-defined values yaml. User defined values override params which override spec values. If there is an error parsing, it is logged and propagated.
func ConvertNestedMapToYaml ¶
func FilterByLabel ¶
func FilterByLabel(ctx context.Context, spec *hubv1.VersionedApplicationSpec, resources kuberesource.UnstructuredResources) kuberesource.UnstructuredResources
func GetInstalledFlavor ¶
func GetManifestsFromApplicationSpec ¶
func GetManifestsFromApplicationSpec(ctx context.Context, inputs ValuesInputs, spec *hubv1.VersionedApplicationSpec) (helmchart.Manifests, error)
func GetResourcesFromManifests ¶
func GetResourcesFromManifests(ctx context.Context, manifests helmchart.Manifests) (kuberesource.UnstructuredResources, error)
func YamlToResources ¶
func YamlToResources(yamlBytes []byte) (kuberesource.UnstructuredResources, error)
Types ¶
type SuperglooInfo ¶
type ValuesInputs ¶
type ValuesInputs struct { Name string InstallNamespace string FlavorName string MeshRef core.ResourceRef SuperglooNamespace string UserDefinedValues string FlavorParams map[string]string SpecDefinedValues string // TODO: remove old value (SuperglooNamespace) after new ones have been wired on the marketplace side Supergloo SuperglooInfo }
func ExecInputValuesTemplates ¶
func ExecInputValuesTemplates(inputs ValuesInputs) (ValuesInputs, error)
The SpecDefinedValues, UserDefinedValues, and FlavorParams inputs can contain template actions (text delimited by "{{" and "}}" ). This function renders the contents of these parameters using the data contained in 'input' and updates 'input' with the results.
Click to show internal directories.
Click to hide internal directories.