kcclite

package
v1.96.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalizeReferencedResourceName

func CanonicalizeReferencedResourceName(name string, nameValueTemplate string, refResource *k8s.Resource,
	smLoader dclmetadata.ServiceMetadataLoader, schemaLoader dclschemaloader.DCLSchemaLoader,
	serviceMappingLoader *servicemappingloader.ServiceMappingLoader, kubeClient client.Client) (string, error)

func ResolveSpecAndStatus

func ResolveSpecAndStatus(state *unstructured.Unstructured, resource *dcl.Resource,
	smLoader dclmetadata.ServiceMetadataLoader) (spec map[string]interface{}, status map[string]interface{}, err error)

ResolveSpecAndStatus returns the resolved spec and status in different formats gated by the 'state-into-spec' annotation.

If the annotation takes the 'merge' value, the function returns the spec as a mix of k8s user managed fields and defaulted state from APIs and returns the status with the legacy format containing observed state for output-only fields only.

If the annotation takes the 'absent' value, the function will delegate to resolveDesiredStateInSpecAndObservedStateInStatus() to resolve the spec and the status.

func ToKCCLite

func ToKCCLite(resource *dcl.Resource, smLoader dclmetadata.ServiceMetadataLoader,
	schemaLoader dclschemaloader.DCLSchemaLoader, serviceMappingLoader *servicemappingloader.ServiceMappingLoader,
	kubeClient client.Client) (*unstructured.Unstructured, error)

ToKCCLite will convert the KRM representation to a state that all fields that can be used without using the API server. More specifically speaking, it will 1) resolve the resource reference and store the value in 'external' field 2) resolve the secret reference and store the value in 'value' field

func ToKCCLiteAndSecretVersions

func ToKCCLiteAndSecretVersions(resource *dcl.Resource, smLoader dclmetadata.ServiceMetadataLoader,
	schemaLoader dclschemaloader.DCLSchemaLoader, serviceMappingLoader *servicemappingloader.ServiceMappingLoader,
	kubeClient client.Client) (kccLite *unstructured.Unstructured, secretVersions map[string]string, err error)

func ToKCCLiteBestEffort

func ToKCCLiteBestEffort(resource *dcl.Resource, smLoader dclmetadata.ServiceMetadataLoader,
	schemaLoader dclschemaloader.DCLSchemaLoader, serviceMappingLoader *servicemappingloader.ServiceMappingLoader,
	kubeClient client.Client) (*unstructured.Unstructured, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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