fix: Better handling of K8s secrets for repository credentials & templates (#3016 #3028) #3029
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes correct deletion of credential templates secrets when the corresponding template is deleted from ArgoCD (fixes #3028) and also handle secret generation in a much more stable way (fixes #3016).
It changes the name of newly generated secrets in that it will not encode part of the repo or template URL into the name anymore, and just uses the FNV hash as identifier (i.e.
repo-XYZ
, whereXYZ
is the hash represented as number). Also, to better differentiate between actual repository credential secrets and credential template secrets, the latter will be prefixed withcreds-
instead ofrepo-
. This change is not breaking and fully backward compatible, as existing secrets will not be touched.Checklist: