vault

package
v0.0.0-...-f214a87 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VaultStore

type VaultStore struct {
	Addr       string
	Namespace  string
	Role       string
	AuthMethod string
	Path       string
	KubeToken  string      // auto-filled
	Client     *api.Client // auto-filled
	Token      string      // auto-filled
}

func (*VaultStore) Login

func (s *VaultStore) Login() (string, error)

Login creates a vault token with the k8s auth provider

func (*VaultStore) NewClient

func (s *VaultStore) NewClient() (*api.Client, error)

NewClients creates and returns a new vault client with a valid token or error

func (*VaultStore) NewToken

func (s *VaultStore) NewToken() (string, error)

NewToken generate a new token for session. If LOCAL env var is set and the token is as well, the login is skipped and the token is used instead.

func (*VaultStore) ParseCertificate

func (s *VaultStore) ParseCertificate(c *tlssecret.Certificate) error

func (*VaultStore) Update

func (s *VaultStore) Update(secret *corev1.Secret) error

func (*VaultStore) WriteSecret

func (s *VaultStore) WriteSecret(sec map[string]interface{}) (map[string]interface{}, error)

WriteSecret writes a secret to Vault VaultClient at path p with secret value s

Jump to

Keyboard shortcuts

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