Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSecretSourceKubernetesInvalidLocation = fmt.Errorf( "invalid Kubernetes secret location format", ) ErrSecretSourceKubernetesInvalidName = fmt.Errorf("invalid Kubernetes name") )
Functions ¶
func WithKubernetes ¶
func WithKubernetes(k8sClient corev1.SecretsGetter) spelunk.SpelunkerOption
WithKubernetes enables the SecretSourceKubernetes.
Types ¶
type SecretSourceKubernetes ¶
type SecretSourceKubernetes struct {
// contains filtered or unexported fields
}
SecretSourceKubernetes digs up secrets from Kubernetes Secrets. The URI scheme for this source is "k8s".
k8s://NAMESPACE/NAME/KEY k8s://NAME/KEY (where NAMESPACE is "default") k8s://NAMESPACE/NAME/ k8s://NAME/ (where NAMESPACE is "default")
When `/KEY` is appended, Spelunk extracts the specific value in the secret's data map. Otherwise, if it ends with `/`, it returns the whole secret's data key-value map as JSON.
This types.SecretSource is a plug-in to spelunker.Spelunker and must be enabled explicitly.
func (*SecretSourceKubernetes) DigUp ¶
func (s *SecretSourceKubernetes) DigUp( ctx context.Context, coord types.SecretCoord, ) (string, error)
func (*SecretSourceKubernetes) Type ¶
func (s *SecretSourceKubernetes) Type() string
Click to show internal directories.
Click to hide internal directories.