K8SPSMDB-1168: pbm: use unique names for downloaded certificates #1662
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.
CHANGE DESCRIPTION
Problem:
When using the operator with
watchAllNamespaces: true
and having the same name for psmdb clusters across multiple namespaces, backups may enter failed state due to the following error:Looking at the pbm agent, the backups completed successfully, but were marked as failed by the operator due to the certificate error.
Cause:
The operator is saving the cluster certificates at
/tmp/<cluster-name>.(crt|pem)
within its filesystem.If the same cluster name is used across multiple namespaces, it is not guaranteed that the files contain the correct data at the right time.
Clusters would be something like this:
This results in the following files in the operator pod:
Solution:
This pr prefixes the files generated by the operator with the namespace the cluster is in and should therefore prevent any race conditions.
CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
compare/*-oc.yml
)?Config/Logging/Testability