-
Notifications
You must be signed in to change notification settings - Fork 160
Implement ccoctl command to create infrastructure required for Azure workload identity #523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #523 +/- ##
==========================================
- Coverage 48.80% 48.54% -0.27%
==========================================
Files 88 93 +5
Lines 9853 11422 +1569
==========================================
+ Hits 4809 5545 +736
- Misses 4469 5259 +790
- Partials 575 618 +43
|
|
UT, /assign @jstuever |
jstuever
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some thoughts during a partial review...
|
@RomanBednar We'll set cloud-credential-operator/pkg/cmd/provisioning/azure/create_managed_identities.go Line 253 in 565bf56
cloud-credential-operator/pkg/cmd/provisioning/azure/create_managed_identities.go Line 42 in 565bf56
|
|
/test e2e-upgrade |
|
/test verify |
1 similar comment
|
/test verify |
… to create Azure infrastructure.
… workload identity.
…t data from implementation.
|
/label docs-approved |
|
/test e2e-azure-manual-oidc |
5 similar comments
|
/test e2e-azure-manual-oidc |
|
/test e2e-azure-manual-oidc |
|
/test e2e-azure-manual-oidc |
|
/test e2e-azure-manual-oidc |
|
/test e2e-azure-manual-oidc |
|
@abutcher: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
|
jstuever
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abutcher, jstuever The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Implement ccoctl command to create infrastructure required for Azure workload identity
Implement
ccoctl azuresub-commands which will create an RSA key pair, OIDC Azure blob container infrastructure and user-assigned managed identities for processedCredentialsRequestswhich must contain.spec.serviceAccountNamesto receive federated identity credentials for the listed service accounts.ccoctl azure create-key-pair
ccoctl azure create-oidc-issuer
OIDC issuer infrastructure will be created in a resource group with a name derived from
--namewhen no--oidc-resource-group-nameis provided. By default this OIDC resource group will be named<--name parameter> + "-oidc", eg"abutchertest-oidc"but may be explicitly named by providing an--oidc-resource-group-nameparameter.Note: The storage account name has more strict requirements than that of a resource group name. For example, if the storage account name derived from the
--nameparameter is invalid the command will exit earlier with an error. If specific naming is required--storage-account-namecan be specified explicitly.ccoctl azure create-managed-identities
ccoctlwill grant permissions to created user-assigned managed identities within the scope of an "installation" resource group and this resource group must be used as the resource group configured for future cluster installation. By default this installation resource group will be named<--name parameter>, eg"abutchertest"but may be explicitly named by providing an--installation-resource-group-nameparameter.Note: The OpenShift installer requires that the installation resource group be entirely empty so
ccoctljust creates the resource group such that the resource group can be used for scoping user-assigned managed identities and instructs that this resource group MUST be used for cluster installation. Being able to provide the installation resource group for scoping allows us to useccoctlto create OIDC/managed identity infrastructure for an existing cluster to assist with testing.In order to scope cluster ingress operations,
ccoctlmust also be provided the--dnszone-resource-group-namewhich is the name of the resource group in which the future cluster's base domain DNS zone exists (as provided to the OpenShift installer via theinstall-config.yaml).ccoctl azure create-all
ccoctl azure create-allcombinescreate-key-pair,create-oidc-issuerandcreate-managed-identitiesinto a single command.ccoctl azure delete
The
deletesubcommand deletes the storage account, blob container and managed identities from the OIDC resource group but will not delete the OIDC resource group unless requested. Note that as above, the OIDC resource group name may be specified by--oidc-resource-group-namebut is defaulted to<--name parameter> + "-oidc".CCO-232
openshift/enhancements#1301