Documentation
¶
Overview ¶
Package kubernetes provides wrappers for Kubernetes secret access
Package kubernetes allows to fetch secrets from Kubernetes Secrets API using REST.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewK8sFileBackend ¶ added in v1.5.0
func NewK8sFileBackend(bc map[string]interface{}) (*file.TextFileBackend, error)
NewK8sFileBackend returns a new Kubernetes file-based secrets backend
Types ¶
type SecretsBackend ¶
type SecretsBackend struct {
Config SecretsBackendConfig
HTTPClient *http.Client
K8sConfig k8sConfig
}
SecretsBackend represents backend for Kubernetes Secrets
func NewK8sSecretsBackend ¶ added in v1.5.0
func NewK8sSecretsBackend(bc map[string]interface{}) (*SecretsBackend, error)
NewK8sSecretsBackend returns a new Kubernetes Secrets backend https://kubernetes.io/docs/tasks/run-application/access-api-from-pod/#directly-accessing-the-rest-api https://github.com/kubernetes/client-go/blob/master/rest/config.go#L543
func (*SecretsBackend) GetSecretOutput ¶
GetSecretOutput retrieves a secret from Kubernetes Secrets
type SecretsBackendConfig ¶
type SecretsBackendConfig struct {
TokenPath string `mapstructure:"token_path"` // optional
CAPath string `mapstructure:"ca_path"` // optional
APIServer string `mapstructure:"api_server"` // optional
}
SecretsBackendConfig is the configuration for a Kubernetes Secrets backend
Click to show internal directories.
Click to hide internal directories.