Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Fix: Annotations map nil sometimes nil when pre-created by the user
Daniel Hougaard1ddacfda6229
diff --git a/k8-operator/controllers/infisicalsecret_helper.go b/k8-operator/controllers/infisicalsecret_helper.goindex 9ae6ad69a4..f92275af48 100644--- a/k8-operator/controllers/infisicalsecret_helper.go+++ b/k8-operator/controllers/infisicalsecret_helper.go@@ -267,6 +267,11 @@ func (r *InfisicalSecretReconciler) UpdateInfisicalManagedKubeSecret(ctx contextplainProcessedSecrets[secret.Key] = []byte(secret.Value)}+ // Initialize the Annotations map if it's nil+ if managedKubeSecret.ObjectMeta.Annotations == nil {+ managedKubeSecret.ObjectMeta.Annotations = make(map[string]string)+ }+managedKubeSecret.Data = plainProcessedSecretsmanagedKubeSecret.ObjectMeta.Annotations[SECRET_VERSION_ANNOTATION] = ETag