controller

package
v0.0.0-...-528bf50 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: Apache-2.0 Imports: 29 Imported by: 0

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"

	// 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"

	// MessageResourceSynced is the message used for an Event fired when a AzureKeyVaultSecret
	// is synced successfully
	MessageResourceSynced = "AzureKeyVaultSecret synced successfully"

	// MessageResourceSyncedWithAzure is the message used for an Event fired when a AzureKeyVaultSecret
	// is synced successfully after getting updated secret from Azure Key Vault
	MessageResourceSyncedWithAzure = "AzureKeyVaultSecret synced successfully with Azure Key Vault"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureCertificateHandler

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

AzureCertificateHandler handles getting and formatting Azure Key Vault Certificate from Azure Key Vault to Kubernetes

func NewAzureCertificateHandler

func NewAzureCertificateHandler(secretSpec *akvsv1alpha1.AzureKeyVaultSecret, vaultService vault.Service) *AzureCertificateHandler

NewAzureCertificateHandler return a new AzureCertificateHandler

func (*AzureCertificateHandler) Handle

func (h *AzureCertificateHandler) Handle() (map[string][]byte, error)

Handle getting and formating Azure Key Vault Certificate from Azure Key Vault to Kubernetes

type AzureKeyHandler

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

AzureKeyHandler handles getting and formatting Azure Key Vault Key from Azure Key Vault to Kubernetes

func NewAzureKeyHandler

func NewAzureKeyHandler(secretSpec *akvsv1alpha1.AzureKeyVaultSecret, vaultService vault.Service) *AzureKeyHandler

NewAzureKeyHandler returns a new AzureKeyHandler

func (*AzureKeyHandler) Handle

func (h *AzureKeyHandler) Handle() (map[string][]byte, error)

Handle getting and formating Azure Key Vault Key from Azure Key Vault to Kubernetes

type AzureMultiValueSecretHandler

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

AzureMultiValueSecretHandler handles getting and formatting Azure Key Vault Secret containing multiple values from Azure Key Vault to Kubernetes

func NewAzureMultiKeySecretHandler

func NewAzureMultiKeySecretHandler(secretSpec *akvsv1alpha1.AzureKeyVaultSecret, vaultService vault.Service) *AzureMultiValueSecretHandler

NewAzureMultiKeySecretHandler returns a new AzureMultiKeySecretHandler

func (*AzureMultiValueSecretHandler) Handle

func (h *AzureMultiValueSecretHandler) Handle() (map[string][]byte, error)

Handle getting and formating Azure Key Vault Secret containing mulitple values from Azure Key Vault to Kubernetes

type AzurePollFrequency

type AzurePollFrequency struct {
	// Normal is the time duration to wait between polls to Azure Key Vault for changes
	Normal time.Duration

	// MaxFailuresBeforeSlowingDown controls how many failures are accepted before reducing the frequency to Slow
	MaxFailuresBeforeSlowingDown int

	// Slow is the time duration to wait between polls to Azure Key Vault for changes, after MaxFailuresBeforeSlowingDown is reached
	Slow time.Duration
}

AzurePollFrequency controls time durations to wait between polls to Azure Key Vault for changes

type AzureSecretHandler

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

AzureSecretHandler handles getting and formatting Azure Key Vault Secret from Azure Key Vault to Kubernetes

func NewAzureSecretHandler

func NewAzureSecretHandler(secretSpec *akvsv1alpha1.AzureKeyVaultSecret, vaultService vault.Service) *AzureSecretHandler

NewAzureSecretHandler return a new AzureSecretHandler

func (*AzureSecretHandler) Handle

func (h *AzureSecretHandler) Handle() (map[string][]byte, error)

Handle getting and formating Azure Key Vault Secret from Azure Key Vault to Kubernetes

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(handler *Handler, secretInformer coreinformers.SecretInformer, azureKeyVaultSecretsInformer informers.AzureKeyVaultSecretInformer, azureFrequency AzurePollFrequency) *Controller

NewController returns a new AzureKeyVaultSecret controller

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

type Handler

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

Handler process work on workqueues

func NewHandler

func NewHandler(kubeclientset kubernetes.Interface, azureKeyvaultClientset clientset.Interface, secretLister corelisters.SecretLister, azureKeyVaultSecretsLister listers.AzureKeyVaultSecretLister, recorder record.EventRecorder, vaultService vault.Service, azureFrequency AzurePollFrequency) *Handler

NewHandler returns a new Handler

type KubernetesSecretHandler

type KubernetesSecretHandler interface {
	Handle() (map[string][]byte, error)
}

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

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