Deal with item paths changing

This commit is contained in:
mcmarkj
2021-07-22 07:11:50 +01:00
parent b50d864b50
commit 48944b0d56

View File

@@ -49,7 +49,7 @@ func CreateKubernetesSecretFromItem(kubeClient kubernetesClient.Client, secretNa
return err return err
} }
if currentSecret.Annotations[VersionAnnotation] != itemVersion { if currentSecret.Annotations[VersionAnnotation] != itemVersion || currentSecret.Annotations[ItemPathAnnotation] != annotations[ItemPathAnnotation]{
log.Info(fmt.Sprintf("Updating Secret %v at namespace '%v'", secret.Name, secret.Namespace)) log.Info(fmt.Sprintf("Updating Secret %v at namespace '%v'", secret.Name, secret.Namespace))
currentSecret.ObjectMeta.Annotations = annotations currentSecret.ObjectMeta.Annotations = annotations
currentSecret.Data = secret.Data currentSecret.Data = secret.Data