Skip to content
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

Azure Stack cloud provider config #5042

Conversation

patrickdillon
Copy link
Contributor

These commits add specific cloud provider configuration for Azure Stack Hub.

be4635c - Adds generic support, separating configuration that differs from public Azure.

d210770 - Is a temporary commit to add credentials to the cloud provider config. Once bootstrap support for the cloud controller manager is added we should revert this commit and keep credentials in a secret, which is not presently supported as explained in the commit message.

Merging d210770 would allow us to make progress with fully automated IPI install and reverting later would be simple enough. I can create a revert PR now with a basic PoC of how to use the merge config based on ARO.

@patrickdillon
Copy link
Contributor Author

/test e2e-azure

@patrickdillon
Copy link
Contributor Author

/test e2e-azure

@patrickdillon patrickdillon force-pushed the azurestack-cloud-provider-config branch from d210770 to fc58baf Compare July 7, 2021 09:45
@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 7, 2021
The AzureStack cloud provider config differs from that of public Azure.
This provides the appropriate values for the following keys when using
ASH:

useManagedIdentityExtension should be false
useInstanceMetadata should be false
loadBalancerSku should be basic
This is a temporary addition to add the client credentials to the cloud
provider config to support bootstrapping the kubelet with the legacy
cloud provider. Once the Azure out-of-tree provider has been implemented
we can utilize a merged cloud provider config similar to ARO so that the
client credentials are saved in a secret rather than in plaintext on the
nodes.

From my reading of the legacy provider in the kubelet, the merged config
is not supported when bootstrapping (hence the need for this commit).
The call for bootstrapping is made here:
https://github.com/openshift/kubernetes/blob/master/staging/src/k8s.io/legacy-cloud-providers/azure/azure.go#L360

But that code never calls getConfigFromSecret, which creates the merged
config:
https://github.com/openshift/kubernetes/blob/master/staging/src/k8s.io/legacy-cloud-providers/azure/azure_config.go#L66

Instead, getConfigFromSecret is called from Initialize:
https://github.com/openshift/kubernetes/blob/master/staging/src/k8s.io/legacy-cloud-providers/azure/azure.go#L675

which appears to only be called from the kube-controller-manager:
https://github.com/openshift/kubernetes/blob/master/cmd/kube-controller-manager/app/controllermanager.go#L601

This is not a problem for Public Azure because it uses managed identity,
which is not supported in Azure Stack.
@patrickdillon patrickdillon force-pushed the azurestack-cloud-provider-config branch from fc58baf to 91b5b56 Compare July 7, 2021 09:47
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 7, 2021
@lobziik
Copy link
Contributor

lobziik commented Jul 20, 2021

/lgtm
Used this in combination with #5084. Worked well for me during cloud-controller-manager debugging.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2021
@lobziik
Copy link
Contributor

lobziik commented Jul 21, 2021

@patrickdillon, maybe we can add ARM endpoint to cloud config?
https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/pkg/auth/azure_auth.go#L68

Actually, i think we can skip part with dumping endpoints config onto config-map and just put arm endpoint into cloud config.
Now it somewhat buggy within authorization procedure:
https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/pkg/auth/azure_auth.go#L228
https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/pkg/auth/azure_auth.go#L268 - this override we miss if passing endpoints config as file without extra mutations.

@patrickdillon
Copy link
Contributor Author

patrickdillon commented Jul 21, 2021

@patrickdillon, maybe we can add ARM endpoint to cloud config?
https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/pkg/auth/azure_auth.go#L68

Actually, i think we can skip part with dumping endpoints config onto config-map and just put arm endpoint into cloud config.
Now it somewhat buggy within authorization procedure:
https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/pkg/auth/azure_auth.go#L228
https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/pkg/auth/azure_auth.go#L268 - this override we miss if passing endpoints config as file without extra mutations.

ARM endpoint is in the infrastructure object:
https://github.com/openshift/installer/blob/master/pkg/asset/manifests/infrastructure.go#L149
&
https://github.com/openshift/api/blob/master/config/v1/types_infrastructure.go#L381

Can you pull it from there?

But thanks for the link. This is a good idea and I will add it to the auth section.

@lobziik
Copy link
Contributor

lobziik commented Jul 21, 2021

Can you pull it from there?

Will have to mutate cloud-config in operator. No other way to pass this thing to ccm. Would be waaay more easy and convenient to put it there in installer.

Adds a field to the Azure cloud provider config for the ARM endpoint and
populates the value in the case of Azure Stack cloud.
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 21, 2021
@patrickdillon
Copy link
Contributor Author

Added in 12251e7 @lobziik

@lobziik
Copy link
Contributor

lobziik commented Jul 21, 2021

/lgtm

Thanks a lot!

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 21, 2021
@patrickdillon
Copy link
Contributor Author

/test e2e-azure
/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 22, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: patrickdillon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 22, 2021
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

3 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

9 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@patrickdillon
Copy link
Contributor Author

/retest-required

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@patrickdillon
Copy link
Contributor Author

/retest-required

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 22, 2021

@patrickdillon: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-openstack-kuryr 12251e7 link /test e2e-openstack-kuryr
ci/prow/e2e-crc 12251e7 link /test e2e-crc
ci/prow/e2e-libvirt 12251e7 link /test e2e-libvirt
ci/prow/e2e-aws-single-node 12251e7 link /test e2e-aws-single-node
ci/prow/e2e-aws-workers-rhel7 12251e7 link /test e2e-aws-workers-rhel7
ci/prow/e2e-metal-ipi-ovn-ipv6 12251e7 link /test e2e-metal-ipi-ovn-ipv6

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

5 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants