sopsenv

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

func IsPGPImportError

func IsPGPImportError(err error) bool

isPGPImportError asserts pgpImportError.

Types

type SOPSEnv

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

func NewSOPSEnv

func NewSOPSEnv(config SOPSEnvConfig) (*SOPSEnv, error)

NewSOPSEnv creates SOPS environment configurator, it works according to the below combinations.

  1. User expects to run SOPS against his local default keychains for GPG and AGE: keysDir="" keysSource="local"

  2. User expects to run SOPS against his custom keychains located under `path`: keysDir="path" keysSource="local"

  3. User expects to run SOPS against Kubernetes-downloaded keys stored at tmp location: keysDir="" keysSource="kubernetes"

  4. User expects to run SOPS against Kubernetes-downloaded keys stored under `path`: keysDir="path" keysSource="kubernetes"

func (*SOPSEnv) Cleanup

func (s *SOPSEnv) Cleanup()

func (*SOPSEnv) GetKeysDir

func (s *SOPSEnv) GetKeysDir() string

func (*SOPSEnv) Setup

func (s *SOPSEnv) Setup(ctx context.Context) error

Setup sets up a self-contingent environment for PGP and AGE keys, and temporarily point SOPS to it, by exporting env vars

type SOPSEnvConfig

type SOPSEnvConfig struct {
	K8sClient  kubernetes.Interface
	KeysDir    string
	KeysSource string
	Logger     micrologger.Logger
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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