kube

package
v0.27.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

func (km *Metadata) Merge() (map[string]string, map[string]string)

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

Jump to

Keyboard shortcuts

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