Documentation ¶
Index ¶
- func FetchNamespaceFromApplicationResource(application *v20231001preview.ApplicationResource) (string, error)
- func FetchNamespaceFromEnvironmentResource(environment *v20231001preview.EnvironmentResource) (string, error)
- func FindNamespaceByEnvID(ctx context.Context, sp dataprovider.DataStorageProvider, envID string) (namespace string, err error)
- type Metadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchNamespaceFromApplicationResource ¶
func FetchNamespaceFromApplicationResource(application *v20231001preview.ApplicationResource) (string, error)
FetchNamespaceFromApplicationResource finds the application-scope Kubernetes namespace from ApplicationResource. If no namespace is found, an error is returned.
func FetchNamespaceFromEnvironmentResource ¶
func FetchNamespaceFromEnvironmentResource(environment *v20231001preview.EnvironmentResource) (string, error)
FetchNamespaceFromEnvironmentResource finds the environment-scope Kubernetes namespace from EnvironmentResource. If no namespace is found, an error is returned.
func FindNamespaceByEnvID ¶
func FindNamespaceByEnvID(ctx context.Context, sp dataprovider.DataStorageProvider, envID string) (namespace string, err error)
FindNamespaceByEnvID finds the environment-scope Kubernetes namespace. If the environment ID is invalid or the environment is not a Kubernetes environment, an error is returned.
Types ¶
type Metadata ¶
type Metadata struct { EnvData map[string]string // EnvData contains labels/annotations defined as a KubernetesMetadataExtension at the Environment level. AppData map[string]string // AppData contains labels/annotations defined as a KubernetesMetadataExtension at the Application level. Input map[string]string // Input contains labels/annotations defined as a KubernetesMetadataExtension at the Current Resource level. ObjectMetadata map[string]string // ObjectMetadata contains labels/annotations that are in the outputresource at the ObjectMeta level. SpecData map[string]string // SpecData contains labels/annotations that are in the outputresource at the Spec level. }
Metadata represents KubernetesMetadata data. It includes labels/annotations defined as KubernetesMetadataExtension at the Environment/Application/Current Resource(Container eg.) level and pre-existing labels/annotations that may be present in the outputresource.
func (*Metadata) Merge ¶
Merge merges environment, application maps with current values and returns updated metaMap and specMap More info: ObjectMeta: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Spec: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status