Documentation ¶
Index ¶
- func GetAPIContext(dopplerSecret secretsv1alpha1.DopplerSecret, dopplerToken string) api.APIContext
- func GetDashboardLink(secrets []models.Secret) string
- func GetKubeSecretAnnotations(secretsResult models.SecretsResult, processorsVersion string, format string) map[string]string
- func GetKubeSecretData(secretsResult models.SecretsResult, ...) (map[string][]byte, error)
- func GetOwnNamespace() (string, error)
- func GetProcessorsVersion(processors secretsv1alpha1.SecretProcessors) (string, error)
- type DopplerSecretReconciler
- func (r *DopplerSecretReconciler) CreateManagedSecret(ctx context.Context, dopplerSecret secretsv1alpha1.DopplerSecret, ...) error
- func (r *DopplerSecretReconciler) GetDopplerToken(ctx context.Context, dopplerSecret secretsv1alpha1.DopplerSecret) (string, error)
- func (r *DopplerSecretReconciler) GetReferencedSecret(ctx context.Context, namespacedName types.NamespacedName) (*corev1.Secret, error)
- func (r *DopplerSecretReconciler) IsDeploymentUsingSecret(deployment v1.Deployment, dopplerSecret secretsv1alpha1.DopplerSecret) bool
- func (r *DopplerSecretReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *DopplerSecretReconciler) ReconcileDeployment(ctx context.Context, deployment v1.Deployment, secret corev1.Secret) error
- func (r *DopplerSecretReconciler) ReconcileDeploymentsUsingSecret(ctx context.Context, dopplerSecret secretsv1alpha1.DopplerSecret) (int, error)
- func (r *DopplerSecretReconciler) SetDeploymentReloadReadyCondition(ctx context.Context, dopplerSecret *secretsv1alpha1.DopplerSecret, ...)
- func (r *DopplerSecretReconciler) SetSecretsSyncReadyCondition(ctx context.Context, dopplerSecret *secretsv1alpha1.DopplerSecret, ...)
- func (r *DopplerSecretReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *DopplerSecretReconciler) UpdateManagedSecret(ctx context.Context, secret corev1.Secret, ...) error
- func (r *DopplerSecretReconciler) UpdateSecret(ctx context.Context, dopplerSecret secretsv1alpha1.DopplerSecret) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAPIContext ¶
func GetAPIContext(dopplerSecret secretsv1alpha1.DopplerSecret, dopplerToken string) api.APIContext
GetAPIContext generates an APIContext from a DopplerSecret
func GetDashboardLink ¶
GetDashboardLink gets a link to the Doppler dashboard from a list of Doppler secrets
func GetKubeSecretAnnotations ¶
func GetKubeSecretAnnotations(secretsResult models.SecretsResult, processorsVersion string, format string) map[string]string
GetKubeSecretAnnotations generates Kube annotations from a Doppler API secrets result
func GetKubeSecretData ¶
func GetKubeSecretData(secretsResult models.SecretsResult, processors secretsv1alpha1.SecretProcessors, includeSecretsByDefault bool) (map[string][]byte, error)
GetKubeSecretData generates Kube secret data from a Doppler API secrets result
func GetOwnNamespace ¶
func GetProcessorsVersion ¶
func GetProcessorsVersion(processors secretsv1alpha1.SecretProcessors) (string, error)
GetProcessorsVersion generates the version of given processors using a SHA256 hash
Types ¶
type DopplerSecretReconciler ¶
DopplerSecretReconciler reconciles a DopplerSecret object
func (*DopplerSecretReconciler) CreateManagedSecret ¶
func (r *DopplerSecretReconciler) CreateManagedSecret(ctx context.Context, dopplerSecret secretsv1alpha1.DopplerSecret, secretsResult models.SecretsResult) error
CreateManagedSecret creates a managed Kubernetes secret
func (*DopplerSecretReconciler) GetDopplerToken ¶
func (r *DopplerSecretReconciler) GetDopplerToken(ctx context.Context, dopplerSecret secretsv1alpha1.DopplerSecret) (string, error)
GetDopplerToken gets the Doppler Service Token referenced by the DopplerSecret
func (*DopplerSecretReconciler) GetReferencedSecret ¶
func (r *DopplerSecretReconciler) GetReferencedSecret(ctx context.Context, namespacedName types.NamespacedName) (*corev1.Secret, error)
GetReferencedSecret gets a Kubernetes secret from a SecretReference
func (*DopplerSecretReconciler) IsDeploymentUsingSecret ¶
func (r *DopplerSecretReconciler) IsDeploymentUsingSecret(deployment v1.Deployment, dopplerSecret secretsv1alpha1.DopplerSecret) bool
Evaluates whether or not the deployment is using the specified DopplerSecret. Specifically, a deployment is using a DopplerSecret if it references it using `envFrom`, `secretKeyRef` or `volumes`.
func (*DopplerSecretReconciler) Reconcile ¶
func (r *DopplerSecretReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
func (*DopplerSecretReconciler) ReconcileDeployment ¶
func (r *DopplerSecretReconciler) ReconcileDeployment(ctx context.Context, deployment v1.Deployment, secret corev1.Secret) error
Reconciles a deployment with a Kubernetes secret Specifically, if the Kubernetes secret version is different from the deployment's secret version annotation, the annotation is updated to restart the deployment.
func (*DopplerSecretReconciler) ReconcileDeploymentsUsingSecret ¶
func (r *DopplerSecretReconciler) ReconcileDeploymentsUsingSecret(ctx context.Context, dopplerSecret secretsv1alpha1.DopplerSecret) (int, error)
Reconciles deployments marked with the restart annotation and that use the specified DopplerSecret.
func (*DopplerSecretReconciler) SetDeploymentReloadReadyCondition ¶
func (r *DopplerSecretReconciler) SetDeploymentReloadReadyCondition(ctx context.Context, dopplerSecret *secretsv1alpha1.DopplerSecret, numDeployments int, deploymentError error)
func (*DopplerSecretReconciler) SetSecretsSyncReadyCondition ¶
func (r *DopplerSecretReconciler) SetSecretsSyncReadyCondition(ctx context.Context, dopplerSecret *secretsv1alpha1.DopplerSecret, updateSecretsError error)
func (*DopplerSecretReconciler) SetupWithManager ¶
func (r *DopplerSecretReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*DopplerSecretReconciler) UpdateManagedSecret ¶
func (r *DopplerSecretReconciler) UpdateManagedSecret(ctx context.Context, secret corev1.Secret, dopplerSecret secretsv1alpha1.DopplerSecret, secretsResult models.SecretsResult) error
UpdateManagedSecret updates a managed Kubernetes secret
func (*DopplerSecretReconciler) UpdateSecret ¶
func (r *DopplerSecretReconciler) UpdateSecret(ctx context.Context, dopplerSecret secretsv1alpha1.DopplerSecret) error
UpdateSecret updates a Kubernetes secret using the configuration specified in a DopplerSecret