vault

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetCustomClient

func SetCustomClient(c VaultClient)

SetCustomClient is used if a custom client needs to be used. Currently only used for testing.

Types

type BankVaultClient

type BankVaultClient struct {
	// contains filtered or unexported fields
}

func (*BankVaultClient) AddSecrets added in v0.2.0

func (b *BankVaultClient) AddSecrets(secrets []VaultSecret) error

func (*BankVaultClient) RemoveSecrets added in v0.2.0

func (b *BankVaultClient) RemoveSecrets(secrets []VaultSecret) error

RemoveSecrets will remove all the keys bellow the given paths. It will list all secrets of in the path and delete them according to the deletion policy.

type VaultClient

type VaultClient interface {
	AddSecrets(secrets []VaultSecret) error
	// remove specific secret
	RemoveSecrets(secret []VaultSecret) error
}

func NewClient

func NewClient(deletionPolicy synv1alpha1.DeletionPolicy, log logr.Logger) (VaultClient, error)

NewClient returns the default VaultClient implementation, ready to be used. It automatically detects, if there was a Vault token provided or if it's running withing kubernetes.

type VaultSecret added in v0.2.0

type VaultSecret struct {
	Path  string
	Value string
}

TODO: similar map like the template files

Jump to

Keyboard shortcuts

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