controllers

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDashboardLink(secrets []models.Secret) string

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, additionalLabels map[string]string, managedBy 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 GetKubeSecretLabels added in v1.6.0

func GetKubeSecretLabels(additionalLabels map[string]string) map[string]string

GetKubeSecretLabels generates Kube labels from the provided managed secret spec values

func GetOwnNamespace

func GetOwnNamespace() (string, error)

func GetProcessorsVersion

func GetProcessorsVersion(processors secretsv1alpha1.SecretProcessors) (string, error)

GetProcessorsVersion generates the version of given processors using a SHA256 hash

func InitializeOIDCCache added in v1.7.0

func InitializeOIDCCache(log logr.Logger, cacheSize int)

Types

type AuthProvider added in v1.7.0

type AuthProvider interface {
	GetAPIContext(ctx context.Context) (*api.APIContext, error)
}

Interface for different authentication methods

type DopplerSecretReconciler

type DopplerSecretReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

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

type OIDCAuthProvider added in v1.7.0

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

Handle OIDC authentication

func (*OIDCAuthProvider) GetAPIContext added in v1.7.0

func (o *OIDCAuthProvider) GetAPIContext(ctx context.Context) (*api.APIContext, error)

type ServiceTokenAuthProvider added in v1.7.0

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

Handle service token authentication

func (*ServiceTokenAuthProvider) GetAPIContext added in v1.7.0

func (s *ServiceTokenAuthProvider) GetAPIContext(ctx context.Context) (*api.APIContext, error)

Jump to

Keyboard shortcuts

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