startup_kube

package
v2.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ObserveConfigMap

func ObserveConfigMap(ctx context.Context, cs *kubernetes.Clientset, namespace, name string, callback ConfigMapUpdate) error

ObserveConfigMap observes a specific ConfigMap. If the ConfigMap already exists, the callback is invoked immediately. Otherwise, the callback is invoked when the ConfigMap is created. The callback is invoked with nil when the ConfigMap is deleted.

ObserveConfigMap will block forever, or until an error occurs.

func WriteConfigMap

func WriteConfigMap(ctx context.Context, cs *kubernetes.Clientset, writer, namespace, name string, data ConfigMapValues) error

Types

type ConfigMapUpdate

type ConfigMapUpdate func(ConfigMapValues) error

type ConfigMapValues

type ConfigMapValues map[string]any

ConfigMapValues contain strings and []byte values.

func FetchConfigMapValues

func FetchConfigMapValues(ctx context.Context, cs *kubernetes.Clientset, namespace, name string) (ConfigMapValues, error)

FetchConfigMapValues fetches the current state of a configmap

type KubernetesOptions

type KubernetesOptions struct {
	KubeConfig  string `long:"kube-config" env:"KUBE_CONFIG" description:"Filename of the kubeconfig to use. Uses in cluster config if not specified"`
	KubeContext string `long:"kube-context" env:"KUBE_CONTEXT" description:"Select the kubernetes context to use from the config"`
}

func (*KubernetesOptions) Client

func (opts *KubernetesOptions) Client() *kubernetes.Clientset

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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