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.
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.
Click to show internal directories.
Click to hide internal directories.