kubernetes

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteKubernetesResource

func DeleteKubernetesResource(ctx context.Context, client k8sClient.Client, item k8sClient.Object) error

func DeleteManagedObjects

func DeleteManagedObjects(ctx context.Context, client k8sClient.Client, objs map[kube.ResourceKey]*unstructured.Unstructured) error

DeleteManagedObjects deletes Kubernetes resources from a map sequentially, returning an error if any deletion fails.

func GetGitSyncInstanceAnnotation

func GetGitSyncInstanceAnnotation(un *unstructured.Unstructured, key string) (string, error)

GetGitSyncInstanceAnnotation returns the application instance name from annotation

func GetSecret

func GetSecret(ctx context.Context, client k8sClient.Client, namespace, secretName string) (*corev1.Secret, error)

GetSecret gets secret using the kubernetes client

func IsValidKubernetesManifestFile

func IsValidKubernetesManifestFile(fileName string) bool

func IsValidKubernetesNamespace

func IsValidKubernetesNamespace(name string) bool

func NewKubectl

func NewKubectl() kube.Kubectl

func SetGitSyncInstanceAnnotation

func SetGitSyncInstanceAnnotation(target *unstructured.Unstructured, key, val string) error

SetGitSyncInstanceAnnotation sets the recommended app.kubernetes.io/instance annotation against an unstructured object

Types

This section is empty.

Jump to

Keyboard shortcuts

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