reduce the number of certs and secrets labeled to just cs-ca and zen-… #2209
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.
…ca plus already specified
What this PR does / why we need it:
Instead of labeling every secret and certificate watched by cert manager, we limit it to the "primary" resources that all other secrets are generated based on. These are the cs-ca-certificate and its accompanying secret and the zen-ca-cert-secret. In addition, there are other secrets previously specified in the script that are still labeled like the IM admin credentials since we do not want those to be regenerated with a different value.
Previously, it did not matter if we labeled them all but now that we need to support restoring into a different namespace, it is very difficult to create the logic that would individually update namespace related values (like dns lists) in secrets like the common-service-db-tls-cert. The secret values should be the same as on the original cluster because they are inherited from the cs-ca-certificate-secret so as long as that secret is carried over, the regenerated secret should contain the same values but with updated namespace values.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Test BR as normal but using this script to label certs and secrets
If resources fail to come up due to certificate issues after restore then we are missing certs/secrets.
I have tested this previously but it was a few weeks ago with a simple BR setup (one without zen or im) so it's possible this is not sufficient when including zen and im
How to backport this PR to other branch:
backport <branch-name>
backport <branch-name>
and leave a comment/backport
to trigger the backport action