kubectl

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKubectlSecretSource

func NewKubectlSecretSource(ctx context.Context, cfg *Config, client SecretGetter, logger logging.Logger, tracerProvider tracing.TracerProvider, metricsProvider metrics.Provider) (secrets.SecretSource, error)

NewKubectlSecretSource creates a SecretSource backed by Kubernetes secrets. If client is nil, a new client is created using the kubeconfig path or in-cluster config.

Types

type Config

type Config struct {
	Namespace  string `env:"NAMESPACE"  json:"namespace"`
	Kubeconfig string `env:"KUBECONFIG" json:"kubeconfig,omitempty"`
}

Config configures the Kubernetes secret source.

func (*Config) ValidateWithContext

func (cfg *Config) ValidateWithContext(ctx context.Context) error

ValidateWithContext validates the config.

type SecretGetter

type SecretGetter interface {
	Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.Secret, error)
}

SecretGetter abstracts the Kubernetes Secrets API for testability.

Jump to

Keyboard shortcuts

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