Skip to content

Commit

Permalink
chore: Remove unneeded secret type check (argoproj#6543)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Gräfen <[email protected]>
  • Loading branch information
jangraefen authored Jun 23, 2021
1 parent a80656d commit 33a8d80
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions util/db/repository_legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@ func (l *legacyRepositoryBackend) upsertSecret(name string, data map[string][]by
}
}
if len(secret.Data) == 0 {
isManagedByArgo := (secret.Annotations != nil && secret.Annotations[common.AnnotationKeyManagedBy] == common.AnnotationValueManagedByArgoCD) ||
(secret.Labels != nil && secret.Labels[common.LabelKeySecretType] == "repository")
isManagedByArgo := secret.Annotations != nil && secret.Annotations[common.AnnotationKeyManagedBy] == common.AnnotationValueManagedByArgoCD
if isManagedByArgo {
return l.db.kubeclientset.CoreV1().Secrets(l.db.ns).Delete(context.Background(), name, metav1.DeleteOptions{})
}
Expand Down

0 comments on commit 33a8d80

Please sign in to comment.