vault

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: BSD-3-Clause Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdateVault

func CreateOrUpdateVault(obj pipeline.Object, data *pipeline.Context) pipeline.Result

func GetServiceAccountToken

func GetServiceAccountToken(instance metav1.Object, data *pipeline.Context) (string, error)

func HandleVaultDeletion

func HandleVaultDeletion(obj pipeline.Object, data *pipeline.Context) pipeline.Result

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

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

func (*BankVaultClient) RemoveSecrets

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.

func (*BankVaultClient) SetDeletionPolicy

func (b *BankVaultClient) SetDeletionPolicy(deletionPolicy synv1alpha1.DeletionPolicy)

type VaultClient

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

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

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