secret

package
v1.9.14 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SecretEnvVarPrefix is a prefix for secret env vars
	SecretEnvVarPrefix = "RUNNER_SECRET_ENV"
	// SecretVarPrefix is a prefix for secret vars
	SecretVarPrefix = "RUNNER_SECRET_VAR_"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvManager

type EnvManager struct {
	Variables map[string]testkube.Variable
}

EnvManager manages secret exchange from job pods using env

func NewEnvManager

func NewEnvManager() *EnvManager

NewEnvManager returns an implementation of the Manager

func NewEnvManagerWithVars added in v1.5.45

func NewEnvManagerWithVars(variables map[string]testkube.Variable) *EnvManager

func (EnvManager) GetEnvs

func (m EnvManager) GetEnvs() (secretEnvs map[string]string)

GetEnvs gets secret envs

func (EnvManager) GetVars

func (m EnvManager) GetVars(variables map[string]testkube.Variable)

GetVars gets secret vars

func (EnvManager) Obfuscate added in v1.5.42

func (m EnvManager) Obfuscate(p []byte) []byte

func (EnvManager) Prepare

func (m EnvManager) Prepare(secretEnvs map[string]string, variables map[string]testkube.Variable) (secretEnvVars []corev1.EnvVar)

Prepare prepares secret env vars based on secret envs and variables

type Manager

type Manager interface {
	// Prepare prepares secret env vars based on secret envs and variables
	Prepare(secretEnvs map[string]string, variables map[string]testkube.Variable) (secretEnvVars []corev1.EnvVar)
	// GetEnvs get secret envs
	GetEnvs() (secretEnvs map[string]string)
	// GetVars gets secret vars
	GetVars(variables map[string]testkube.Variable)
	// Obfuscate obfuscates secret values
	Obfuscate(p []byte) []byte
}

Manager is responsible for exchanging secrets with executor pod

Jump to

Keyboard shortcuts

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