utils

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFolder

func CreateFolder(path string, override bool) error

Create folder (clear its content if it exists)

func WriteFile

func WriteFile(path string, content string) error

WriteFile writes content to a file

Types

type K8sClient added in v0.1.4

type K8sClient struct {
	// contains filtered or unexported fields
}

func NewK8sClient added in v0.1.4

func NewK8sClient() (*K8sClient, error)

func (*K8sClient) ApplyManifestFromFile added in v0.1.4

func (c *K8sClient) ApplyManifestFromFile(path string, fallbackNamespace string) error

ApplyManifestFromFile applies a Kubernetes manifest from a file

func (*K8sClient) ApplyManifestFromString added in v0.1.4

func (c *K8sClient) ApplyManifestFromString(manifest string, fallbackNamespace string) error

func (*K8sClient) CreateNamespace added in v0.1.4

func (c *K8sClient) CreateNamespace(namespace string) error

create namespace

func (*K8sClient) DeleteArgoCDApplications added in v0.1.4

func (c *K8sClient) DeleteArgoCDApplications(namespace string) error

func (*K8sClient) GetArgoCDApplications added in v0.1.4

func (c *K8sClient) GetArgoCDApplications(namespace string) (string, error)

func (*K8sClient) GetConfigMaps added in v0.1.4

func (c *K8sClient) GetConfigMaps(namespace string, names ...string) (string, error)

func (*K8sClient) GetResourceAnnotation added in v0.1.4

func (c *K8sClient) GetResourceAnnotation(gvr schema.GroupVersionResource, namespace string, name string, annotationKey string) (string, error)

GetResourceAnnotation retrieves a specific annotation from any Kubernetes resource

func (*K8sClient) GetSecretValue added in v0.1.4

func (c *K8sClient) GetSecretValue(namespace string, name string, key string) (string, error)

get secret value from key. e.g. key: "password"

func (*K8sClient) RemoveObstructiveFinalizers added in v0.1.4

func (c *K8sClient) RemoveObstructiveFinalizers(namespace string) error

RemoveObstructiveFinalizers removes finalizers from applications that would prevent deletion

func (*K8sClient) WaitForDeploymentReady added in v0.1.4

func (c *K8sClient) WaitForDeploymentReady(namespace, name string, timeoutSeconds int) error

WaitForDeploymentReady waits for a deployment to be available Equivalent to: kubectl wait --for=condition=available deployment/name

Jump to

Keyboard shortcuts

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