k8s

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Client is the vault client
	Client *vault.Client
	// K8sTokenPath is the path to the kubernetes service account jwt
	K8sTokenPath string
	// Role is the role string
	Role string
	// RoleFunc is a function to build the role
	RoleFunc func(string) (string, error)
	// FileSystem is the file system to use
	// If no value provided it uses the os file system
	FileSystem nfs.FileSystem
}

Config is the config of a VaultAuth provider

type VaultAuth

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

VaultAuth is the structure representing a vault authentication provider

func New

func New(cfg *Config) *VaultAuth

New creates a new K8sVaultauth with the given config cfg.

func (*VaultAuth) Token

func (k *VaultAuth) Token() (string, time.Duration, error)

Token returns a vault token or an error if it encountered one. {"jwt": "'"$KUBE_TOKEN"'", "role": "{{ SERVICE_ACCOUNT_NAME }}"}

Jump to

Keyboard shortcuts

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