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

WIP: Azure Stack store credentials in a secret #5046

Closed

Conversation

patrickdillon
Copy link
Contributor

Depends on #5042

Also depends on the introduction of the cloud controller manager at bootstrap. Once the cloud controller manager has been introduced, we should be able to test this to see whether we can store credentials in a merged cloud provider config similar to ARO.

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.
…fig"

This reverts commit d210770.
With the introduction of the CCM at bootstrap we can use a secret to
store credentials and the CCM will create a merged CPC.
This change creates the resources needed to store client credentials in
a secret and produce a merged cloud provider config.
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 30, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 30, 2021

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from patrickdillon after the PR has been reviewed.

The full list of commands accepted by this bot can be found 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
Copy link
Contributor

openshift-ci bot commented Jul 12, 2021

@patrickdillon: PR needs rebase.

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.

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 12, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 1, 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 Required Rerun command
ci/prow/e2e-crc 4d865fb link /test e2e-crc
ci/prow/e2e-metal-ipi-ovn-ipv6 4d865fb link /test e2e-metal-ipi-ovn-ipv6
ci/prow/okd-images 4d865fb link /test okd-images
ci/prow/okd-verify-codegen 4d865fb link /test okd-verify-codegen
ci/prow/e2e-aws-workers-rhel8 4d865fb link /test e2e-aws-workers-rhel8
ci/prow/okd-unit 4d865fb link true /test okd-unit
ci/prow/e2e-aws 4d865fb link true /test e2e-aws
ci/prow/openstack-manifests 4d865fb link true /test openstack-manifests
ci/prow/e2e-aws-upgrade 4d865fb link true /test e2e-aws-upgrade

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.

@patrickdillon
Copy link
Contributor Author

/close

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 3, 2021

@patrickdillon: Closed this PR.

In response to this:

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant