-
Notifications
You must be signed in to change notification settings - Fork 320
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
OCPBUGS-42434: Enable Managed Identity w/ Certificates in HyperShift Control Plane Components #5160
base: main
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox 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 |
✅ Deploy Preview for hypershift-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
7cdb04d
to
3ce0090
Compare
Reconcile the SecretProviderClass for the ingress operator for ARO HCP deployments. The SecretProviderClass is used by the Secrets Store CSI driver to mount a certificate to a volume in the ingress pod deployment. Signed-off-by: Bryan Cox <brcox@redhat.com>
Signed-off-by: Bryan Cox <brcox@redhat.com>
Reconcile the Azure credentials information secret to a fixed secret name, azure-credential-information, in the hosted control plane namespace. Signed-off-by: Bryan Cox <brcox@redhat.com>
This commit authenticates Azure KMS with certificate authentication in order to communicate with Azure Cloud API. The certificate is stored in an Azure key vault and mounted into the KAS pod through a Secrets Store CSI driver SecretProviderClass. Signed-off-by: Bryan Cox <brcox@redhat.com>
Reconcile the SecretProviderClass for the control plane operator for ARO HCP deployments. The SecretProviderClass is used by the Secrets Store CSI driver to mount a certificate to a volume in the control plane operator pod deployment. Signed-off-by: Bryan Cox <brcox@redhat.com>
Update the go.mod to include the specific commit that includes the changes to allow service principal with certificate to use a certificate . Signed-off-by: Bryan Cox <brcox@redhat.com>
This commit authenticates CAPZ with certificate authentication in order to communicate with Azure Cloud API. The certificate is stored in an Azure key vault and mounted into the capi-provider pod through a Secrets Store CSI driver SecretProviderClass. Signed-off-by: Bryan Cox <brcox@redhat.com>
3ce0090
to
ef8852b
Compare
@bryan-cox: This pull request references Jira Issue OCPBUGS-42434, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. In 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 openshift-eng/jira-lifecycle-plugin repository. |
/retest |
This commit changes the authentication from client secret to client certificate as well as reconciling the SecretProviderClass for cloud provider for ARO HCP deployments. The SecretProviderClass is used by the Secrets Store CSI driver to mount a certificate to a volume in the azure-cloud-controller-manager pod's deployment. Signed-off-by: Bryan Cox <brcox@redhat.com>
ef8852b
to
23241af
Compare
/test e2e-aks |
/test e2e-aws |
return fmt.Errorf("failed to get Azure credentials secret: %w", err) | ||
} | ||
|
||
tenantID := strings.TrimSpace(string(credentialsSecret.Data["AZURE_TENANT_ID"])) |
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.
Do we need to trim spaces here?
@@ -2,6 +2,7 @@ package azure | |||
|
|||
import ( | |||
"fmt" | |||
"github.com/openshift/hypershift/support/azureutil" |
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.
Sort imports
@@ -3,6 +3,9 @@ package azure | |||
import ( | |||
"encoding/json" | |||
"fmt" | |||
"github.com/openshift/hypershift/control-plane-operator/controllers/hostedcontrolplane/secretproviderclass" |
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.
sort imports
/test e2e-aws-4-17 |
Signed-off-by: Bryan Cox <brcox@redhat.com>
/test unit |
/retest |
@bryan-cox: The following tests failed, say
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-sigs/prow repository. I understand the commands that are listed here. |
@@ -20,5 +22,12 @@ func adaptDeployment(cpContext component.ControlPlaneContext, deployment *appsv1 | |||
fmt.Sprintf("--cluster-name=%s", cpContext.HCP.Spec.InfraID), | |||
) | |||
}) | |||
deployment.Spec.Template.Spec.Containers[0].VolumeMounts = append(deployment.Spec.Template.Spec.Containers[0].VolumeMounts, |
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.
please move this inside util.UpdateContainer
function above and use the passed in container instead of deployment.Spec.Template.Spec.Containers[0]
@@ -49,14 +51,17 @@ func adaptConfigSecret(cpContext component.ControlPlaneContext, secret *corev1.S | |||
return nil | |||
} | |||
|
|||
func adaptSecretProvider(cpContext component.ControlPlaneContext, secretProvider *secretsstorev1.SecretProviderClass) error { | |||
secretProvider = manifests.ManagedAzureSecretProviderClass(secretProvider.Name, cpContext.HCP.Namespace) |
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.
secretProvider = manifests.ManagedAzureSecretProviderClass(secretProvider.Name, cpContext.HCP.Namespace) |
This line is not needed
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-sigs/prow repository. |
What this PR does / why we need it:
This PR enables components in the hosted control plane to authenticate with Azure Cloud through client certificate. These components include:
Which issue(s) this PR fixes:
Fixes OCPBUGS-42434
Checklist