Separate authorization checks for the operator and domain namespaces #2138
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.
We have functionality in the HealthCheckHelper class that verifies that the operator has all of the necessary privileges in each namespace in order to do its work. This code had been previously cleaned-up, but in that rewrite an important distinction was lost.
Specifically, that the privileges needed in the operator's own namespace (as opposed to those needed in some domain namespace) are different and that if the operator's own namespace is also a domain namespace then both sets of privileges are required.
I noticed that most operator logs had a lot of WARNING statements from these authorization checks... The reason was that the HealthCheckHelper was looking for domain namespace privileges for the operator's namespace.
Finally, I cleaned-up just a little the set of roles needed for the operator's namespace.