secret

package
v0.26.4 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Masterkey = "empty"

Functions

func JoinPath

func JoinPath(base string, append ...string) string

func Parse

func Parse(gitClient *git.Client, files ...string) (trees []*tree.Tree, err error)

func Read

func Read(monitor mntr.Monitor, gitClient *git.Client, secretFunc GetFunc, path string) (string, error)

func Rewrite added in v0.21.0

func Rewrite(monitor mntr.Monitor, gitClient *git.Client, operator, newMasterKey string, desired *tree.Tree) error

func Write

func Write(monitor mntr.Monitor, gitClient *git.Client, secretFunc GetFunc, path, value string) error

Types

type Existing

type Existing struct {
	//Name of the Secret
	Name string `json:"name" yaml:"name"`
	//Key in the secret from where the value should be used
	Key string `json:"key" yaml:"key"`
	//Name which should be used internally, should be unique for the volume and volumemounts
	InternalName string `json:"internalName,omitempty" yaml:"internalName,omitempty"`
}

Existing: Used secret that has to be already existing in the cluster

type ExistingIDSecret

type ExistingIDSecret struct {
	//Name of the Secret
	Name string `json:"name" yaml:"name"`
	//Key in the secret which contains the ID
	IDKey string `json:"idKey" yaml:"idKey"`
	//Key in the secret which contains the secret
	SecretKey string `json:"secretKey" yaml:"secretKey"`
	//Name which should be used internally, should be unique for the volume and volumemounts
	InternalName string `json:"internalName,omitempty" yaml:"internalName,omitempty"`
}

Existing: Used secret that has to be already existing in the cluster and should contain id/username and secret/password

type Func

type Func func(monitor mntr.Monitor, desiredTree *tree.Tree) (secrets map[string]*Secret, err error)

type GetFunc

type GetFunc func(operator string) Func

type Secret

type Secret struct {
	//Encryption algorithm used for the secret
	Encryption string
	//Encoding algorithm used for the secret
	Encoding string
	//Encrypted and encoded Value
	Value string
}

Secret: Secret handled with orbctl so no manual changes are required

func InitIfNil added in v0.21.0

func InitIfNil(sec *Secret) *Secret

func (*Secret) MarshalYAML

func (s *Secret) MarshalYAML() (interface{}, error)

func (*Secret) Unmarshal added in v0.21.0

func (s *Secret) Unmarshal(masterkey string) error

func (*Secret) UnmarshalYAML

func (s *Secret) UnmarshalYAML(node *yaml.Node) error

func (*Secret) UnmarshalYAMLWithExisting added in v0.21.0

func (s *Secret) UnmarshalYAMLWithExisting(node *yaml.Node, existing *Existing) error

Jump to

Keyboard shortcuts

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