secrets

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FullVersionName = fmt.Sprintf("%s-%s", Version, Tag)

FullVersionName is the user-visible aggregation of version and tag of this codebase

View Source
var Tag = "dev"

Tag field denotes the specific build type for the broker. It may be replaced by compile-time variables if needed to provide the git commit information in the final binary.

View Source
var Version = "1.4.0"

Version field is a SemVer that should indicate the baked-in version

Functions

This section is empty.

Types

type ProviderConfig

type ProviderConfig struct {
	// Config common to all providers
	StoreType string

	// Config specific to Kubernetes Secrets provider
	PodNamespace       string
	RequiredK8sSecrets []string

	// Config specific to Push to File provider
	SecretFileBasePath   string
	TemplateFileBasePath string
	AnnotationsMap       map[string]string
}

ProviderConfig provides the configuration necessary to create a secrets Provider.

type ProviderFunc

type ProviderFunc func() error

ProviderFunc describes a function type responsible for providing secrets to an unspecified target.

func NewProviderForType

func NewProviderForType(
	traceContext context.Context,
	secretsRetrieverFunc conjur.RetrieveSecretsFunc,
	providerConfig ProviderConfig,
) (ProviderFunc, []error)

NewProviderForType returns a ProviderFunc responsible for providing secrets in a given mode.

func RetryableSecretProvider

func RetryableSecretProvider(
	retryInterval time.Duration,
	retryCountLimit int,
	provideSecrets ProviderFunc,
) ProviderFunc

RetryableSecretProvider returns a new ProviderFunc, which wraps the provided ProviderFunc in a limitedBackOff-restricted Retry call.

func SecretProvider added in v1.4.0

func SecretProvider(
	secretRefreshInterval time.Duration,
	mode string,
	provideSecrets ProviderFunc,
	providerQuit chan struct{},
) ProviderFunc

SecretProvider returns a new ProviderFunc, which wraps a retryable ProviderFunc inside a function that operates in one of three modes:

  • Run once and return (for init or application container modes)
  • Run once and sleep forever (for sidecar mode without periodic refresh)
  • Run periodically (for sidecar mode with periodic refresh)

Directories

Path Synopsis
clients
k8s

Jump to

Keyboard shortcuts

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