vault

package
v0.0.0-...-81c75b8 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context(ctx context.Context, client *Client) context.Context

func LogWarnings

func LogWarnings(s *api.Secret, logger log.Logger)

Types

type Client

type Client struct {
	*api.Client
	// contains filtered or unexported fields
}

func ForceContext

func ForceContext(ctx context.Context) *Client

func NewVaultClient

func NewVaultClient(logger log.Logger, config Config) (*Client, error)

func (*Client) OnAuth

func (c *Client) OnAuth(f func() error)

OnAuth calls f whenever the client authenticates. It's most useful for an auto-renewing client. If the client is already authenticated when OnAuth is called, f will be called immediately.

type Config

type Config struct {
	Address  string `default:"https://vault.vault.svc.cluster.local"`
	AuthPath string `default:"auth/kubernetes/login"`
	Role     string
	// *bool instead of bool to allow configuring the value to false
	Autorenew *bool `default:"true"`

	Token         string
	TokenFilename string `default:"/var/run/secrets/kubernetes.io/serviceaccount/token"`

	Disabled bool
}

type ServiceAccount

type ServiceAccount struct {
	Client *api.Client
}

Jump to

Keyboard shortcuts

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