operator: Provide Azure region for managed credentials using environment variable #11964
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.
What this PR does / why we need it:
Currently there is no field in the OpenShift Console UI to set the "Azure Region" for the operator when it is installed into a managed-credentials (Azure Workload Identity Federation) cluster. The region is only used when creating the managed identity, which is not done by the operator, so it does not need this attribute for its own operation.
The operator tries to create a
CredentialRequest
for the cloud-credential-operator though, which, on Azure, requires the region to be set.Because this will only apply to a limited set of users, and we also hope that the Console is updated to include the field in its UI, this PR changes the current handling of providing the "region" using the storage secret, which would require every managed-auth user to set it, to using an environment variable on the operator. This allows users who require this information to set it and, at the same time, allows other users to ignore this requirement as the operator can just fall back to using a default region (we picked
centralus
).Which issue(s) this PR fixes:
Related to LOG-4702
Special notes for your reviewer:
Checklist
CONTRIBUTING.md
guide (required)CHANGELOG.md
updated