WIP Azure IPI - Remove need for Subscription Admin Consent permission#2855
WIP Azure IPI - Remove need for Subscription Admin Consent permission#2855hassenius wants to merge 1 commit into
Conversation
|
Hi @hassenius. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Worth noting, I haven't done anything with the destroy action, but initial thought is that an appropriate approach might be to but some indicator in the metadata.json file during installation to indicate that the cluster was created into an existing resource group so that the destroy action just cleans up the DNS resources and prints a message informing that the resource group and all it's resources need to be deleted manually? |
| ComputeSubnet string `json:"computeSubnet,omitempty"` | ||
|
|
||
| // ResourceGroupName specifies an existing resource group to deploy to | ||
| ResourceGroupName string `json:"resourceGroupName,omitempty"` |
There was a problem hiding this comment.
This is not acceptable for IPI installations. this increases the burden on the operators and installer as we needs another way to cleanup.
There was a problem hiding this comment.
In the case of Azure, this is really just a single action of deleting the resource group. This will delete everything else (except the DNS entries).
If it is desired to be able to be able to offer cleanup, we can pass the ResourceGroupName to the metadata.json file, and then in the destroy action check for this value. If the value is not there fallback to the naming assumption.
|
/hold any solution that depends on providing a resource group for cluster is high likely hood of being rejected. |
|
So, I would argue that, at least in my experience working with other Kubernetes vendors on Azure, for a majority of organisations will prefer a tightly scoped option, where they provide a resource group, network and a user with appropriate access to these only. |
That's not the reason for Admin Consent requirement. Users with User Access Administrator role in the subsciptions can can create/manage managed-identities. The actual reason is that cluster operators need credentials to communicate with Azure API. and OpenShift has the cred-minter cluster operator which creates new service principal and provides the credentials for that to the operators, making sure these new ones only have required permissions. So this change doesn't solve the problem. |
|
Bummer. As per the design principles of the credential minter: https://github.com/openshift/cloud-credential-operator it should by design still be possible to supply credentials that are limited to the resource group scope (if my understanding is right); with the drawback that the individual components will have credentials that are too broadly scoped. As mentioned, in my organisation there is no way I can deploy OpenShift 4 using the IPI method with the current Admin Consent requirement. I believe there are many organisations using Azure in the same situation. |
|
Closing in favor of generating consensus in #2357 before we work up the implementation.. /close |
|
@abhinavdahiya: Closed this PR. DetailsIn response to this:
Instructions 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. |
|
@hassenius: PR needs rebase. 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. |
@fabianofranz @jhixson74 I will probably need some help to get this one over the line.
Background
Initial proposal to allow deployments to Azure using IPI method without the need for Admin Consent, which is going to be an issue for a substantial portion of Azure accounts (including myself).
This is the subject of several issues, most specifically #2357
Essentially the only thing in the original Azure IPI approach that drove the need for Admin Consent was the terraform code to create the User Assigned Identity. However, in my experience it's very very difficult to obtain service principals with excessive access, not to mention unfeathered access -- particularly in a production environment.
Proposal
This PR allows a 2 phase deployment flow where a subscription admin (or anyone with the lesser User Administrator role) can create a Resource Group and a User Assigned Identity with Contributor role assigned to that Resource Group.
In Terraform terms this translates to
If utilising the feature added in #2441 the
ContributororNetwork Contributorrole should also be added to the resource group where the Vnet/Subnets are located.For the second, installation, face the resource group and identity is then handed to the openshift installer via these two entries in
install-config.yamlCurrent state of this commit
The terraform builds the network, boot and master nodes successfully with the identity specified in
install-config.yaml, but the installer eventually fails with this message:I am not able to troubleshoot why. From the boot node I can see the process stopping on this step in bootkube.sh
and I notice when I try ping the master nodes I get a lot of timeouts, so it seems the master nodes are rebooting a lot
Since I cannot create an environment without this code added, I'm not able to tell if this is because of this code, or a problem elsewhere in the codebase.