Documentation ¶
Index ¶
- func CompareExistingSecretDataToNewData(secretManglerObject *v1alpha1.SecretMangler, ...) int
- func DataBuilder(secretManglerObject *v1alpha1.SecretMangler, newData *map[string][]byte, ...) bool
- func IsLookupString(lookupString string) (isLookupString bool)
- func ParseLookupString(lookupString string) (namespaceName string, existingSecretName string, existingSecretField string, ...)
- func RetrieveSecret(existingSecretName, namespaceName string, r *SecretManglerReconciler, ...) *v1.Secret
- func SecretBuilder(secretManglerObject *v1alpha1.SecretMangler, givenData *map[string][]byte, ...) *v1.Secret
- type SecretManglerReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareExistingSecretDataToNewData ¶
func CompareExistingSecretDataToNewData(secretManglerObject *v1alpha1.SecretMangler, existingSecretData *map[string][]byte, newData *map[string][]byte, ctx context.Context) int
CompareExistingSecretDataToNewData compares to data maps of Secrets. It will return 0 on equal, 1 on Secret needs update, 2 on Secret needs to be deleted
func DataBuilder ¶
func DataBuilder(secretManglerObject *v1alpha1.SecretMangler, newData *map[string][]byte, returnOnSourceNotFound bool, r *SecretManglerReconciler, ctx context.Context) bool
DataBuilder generates the data mappings of a secret from a SecretMangler object.
func IsLookupString ¶
IsLookupString checks if a string starts with < and ends with > which indicates a lookup string.
func ParseLookupString ¶
func ParseLookupString(lookupString string) (namespaceName string, existingSecretName string, existingSecretField string, ok bool)
ParseLookupString will parse a lookupString used in mappings or mirror. If no namespace was given an empty string will be returned instead of a namespace. If the lookupString does not at least contain a secret and a field reference false will be returned for ok.
func RetrieveSecret ¶
func RetrieveSecret(existingSecretName, namespaceName string, r *SecretManglerReconciler, ctx context.Context) *v1.Secret
RetrieveSecret retrieves a secret from the Kubernetes cluster with a given Name and Namespace.
func SecretBuilder ¶
func SecretBuilder(secretManglerObject *v1alpha1.SecretMangler, givenData *map[string][]byte, r *SecretManglerReconciler, ctx context.Context) *v1.Secret
SecretBuilder generates a secret based on a SecretMangler object with all data and metadata. The secret will not be applied to the Kubernetes cluster.
Types ¶
type SecretManglerReconciler ¶
SecretManglerReconciler reconciles a SecretMangler object
func (*SecretManglerReconciler) Reconcile ¶
func (r *SecretManglerReconciler) 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.
func (*SecretManglerReconciler) SetupWithManager ¶
func (r *SecretManglerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.