controller

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 35 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// SuccessSynced is used as part of the Event 'reason' when a AzureKeyVaultSecret is synced
	SuccessSynced = "Synced"

	// ErrResourceExists is used as part of the Event 'reason' when a AzureKeyVaultSecret fails
	// to sync due to a Secret of the same name already existing.
	ErrResourceExists = "ErrResourceExists"

	// ErrAzureVault is used as part of the Event 'reason' when a AzureKeyVaultSecret fails
	// to sync due to a Secret of the same name already existing.
	ErrAzureVault = "ErrAzureVault"

	// ErrConfigMap is used as part of the Event 'reason' when a Secret sync fails
	ErrConfigMap = "ErrConfigMap"

	// FailedAzureKeyVault is the message used for Events when a resource
	// fails to get secret from Azure Key Vault
	FailedAzureKeyVault = "Failed to get secret for '%s' from Azure Key Vault '%s'"

	// MessageResourceExists is the message used for Events when a resource
	// fails to sync due to a Deployment already existing
	MessageResourceExists = "Resource '%s' already exists and is not managed by AzureKeyVaultSecret"

	// MessageAzureKeyVaultSecretSynced is the message used for an Event fired when a AzureKeyVaultSecret
	// is synced successfully
	MessageAzureKeyVaultSecretSynced = "AzureKeyVaultSecret synced to Kubernetes Secret successfully"

	// MessageAzureKeyVaultSecretSyncedWithAzureKeyVault is the message used for an Event fired when a AzureKeyVaultSecret
	// is synced successfully after getting updated secret from Azure Key Vault
	MessageAzureKeyVaultSecretSyncedWithAzureKeyVault = "AzureKeyVaultSecret synced to Kubernetes Secret successfully with change from Azure Key Vault"

	ControllerName = "Akv2k8s controller"
)

Variables

This section is empty.

Functions

func NewAzureCertificateHandler

func NewAzureCertificateHandler(secretSpec *akv.AzureKeyVaultSecret, vaultService vault.Service) *azureCertificateHandler

NewAzureCertificateHandler return a new AzureCertificateHandler

func NewAzureKeyHandler

func NewAzureKeyHandler(secretSpec *akv.AzureKeyVaultSecret, vaultService vault.Service) *azureKeyHandler

NewAzureKeyHandler returns a new AzureKeyHandler

func NewAzureMultiKeySecretHandler

func NewAzureMultiKeySecretHandler(secretSpec *akv.AzureKeyVaultSecret, vaultService vault.Service) *azureMultiValueSecretHandler

NewAzureMultiKeySecretHandler returns a new AzureMultiKeySecretHandler

func NewAzureSecretHandler

func NewAzureSecretHandler(secretSpec *akv.AzureKeyVaultSecret, vaultService vault.Service, transformator transformers.Transformator) *azureSecretHandler

NewAzureSecretHandler return a new AzureSecretHandler

Types

type CABundle

type CABundle struct {
	ConfigMapName   string
	SecretNamespace string
	SecretName      string
}

type Clock

type Clock struct {
}

Clock is a simple Time impl

func (*Clock) Now

func (t *Clock) Now() metav1.Time

Now returns current time

type Controller

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

Controller is the controller implementation for AzureKeyVaultSecret resources

func NewController

func NewController(client kubernetes.Interface, akvsClient akvcs.Interface, akvInformerFactory akvInformers.SharedInformerFactory, kubeInformerFactory informers.SharedInformerFactory, recorder record.EventRecorder, vaultService vault.Service, options *Options) *Controller

NewController returns a new AzureKeyVaultSecret controller

func (*Controller) Run

func (c *Controller) Run(stopCh <-chan struct{})

Run will start the controller

type KubernetesHandler

type KubernetesHandler interface {
	HandleSecret() (map[string][]byte, error)
	HandleConfigMap() (map[string]string, error)
}

KubernetesSecretHandler handles getting and formatting secrets from Azure Key Vault to Kubernetes

type NamespaceSelectorLabel

type NamespaceSelectorLabel struct {
	Name  string
	Value string
}

type Options

type Options struct {
	NumThreads     int
	MaxNumRequeues int
	ResyncPeriod   time.Duration
	AkvsRef        corev1.ObjectReference
}

Options contains options for the controller

type Timer

type Timer interface {
	Now() metav1.Time
}

Timer is a simple interface for time handling

Jump to

Keyboard shortcuts

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