STOR-2770: Stop generating self-signed certificates#662
Conversation
|
@mpatlasov: This pull request references STOR-2770 which is a valid jira issue. 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 openshift-eng/jira-lifecycle-plugin repository. |
8482eec to
9ab6e2c
Compare
|
@mpatlasov: This pull request references STOR-2770 which is a valid jira issue. 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 openshift-eng/jira-lifecycle-plugin repository. |
9ab6e2c to
bf9b502
Compare
|
/lgtm |
|
/retest-required |
8 similar comments
|
/retest-required |
|
/retest-required |
|
/retest-required |
|
/retest-required |
|
/retest-required |
|
/retest-required |
|
/retest-required |
|
/retest-required |
|
/test hypershift-e2e-aks |
1 similar comment
|
/test hypershift-e2e-aks |
|
@mpatlasov @radeore and log2:
So it looks like introduced by our PR, the serving-cert Secret doesn't consider the azure hypershift case. |
|
Or because the managed cluster is an AKS? |
|
/payload-job periodic-ci-openshift-openshift-tests-private-release-4.22-amd64-nightly-azure-ipi-ovn-hypershift-guest-f7 |
|
@duanwei33: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/7a79d8e0-1252-11f1-8a2d-013dc1aeada9-0 |
Use `name` in Service selector. It matches to the `name` label in Deployment pod template section.
@jsafrane , I fixed this issue in all Service yaml-s for uniformity. PTAL |
|
@mpatlasov: This pull request references STOR-2770 which is a valid jira issue. 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 openshift-eng/jira-lifecycle-plugin repository. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
assets/csidriveroperators/gcp-pd/01_service.yaml (1)
1-19: Operational note: Hypershift control-plane may not receive the serving-cert Secret.Per PR discussion, in Hypershift/managed (e.g., AKS) environments, the service-ca-operator runs in the management cluster and may not create the Secret in the control-plane namespace where the operator Pod is deployed. This can cause
MountVolume.SetUp failed for volume "serving-cert"errors and prevent the controller deployment from becoming ready.Consider whether a fallback mechanism or conditional logic is needed for Hypershift scenarios.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@assets/csidriveroperators/gcp-pd/01_service.yaml` around lines 1 - 19, The Service manifest currently unconditionally sets the service-ca annotation (service.beta.openshift.io/serving-cert-secret-name: gcp-pd-csi-driver-operator-serving-cert) which leads the operator Deployment to expect a Secret named gcp-pd-csi-driver-operator-serving-cert and mount the volume "serving-cert"; add a Hypershift-aware fallback by making the annotation conditional (do not set it in hosted control-plane installs) and update the operator bootstrap/reconcile logic to detect the absence of the serving-cert Secret and either (a) create a self-signed or projected fallback Secret or (b) skip/avoid mounting "serving-cert" so the Pod does not fail to start; target the code that applies this Service and the Deployment manifest changes that reference the "serving-cert" volume/secret to implement the conditional behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@assets/csidriveroperators/gcp-pd/01_service.yaml`:
- Around line 1-19: The Service manifest currently unconditionally sets the
service-ca annotation (service.beta.openshift.io/serving-cert-secret-name:
gcp-pd-csi-driver-operator-serving-cert) which leads the operator Deployment to
expect a Secret named gcp-pd-csi-driver-operator-serving-cert and mount the
volume "serving-cert"; add a Hypershift-aware fallback by making the annotation
conditional (do not set it in hosted control-plane installs) and update the
operator bootstrap/reconcile logic to detect the absence of the serving-cert
Secret and either (a) create a self-signed or projected fallback Secret or (b)
skip/avoid mounting "serving-cert" so the Pod does not fail to start; target the
code that applies this Service and the Deployment manifest changes that
reference the "serving-cert" volume/secret to implement the conditional
behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d1ba6f8f-77ec-48ea-9915-0f343f7c22c1
⛔ Files ignored due to path filters (10)
assets/csidriveroperators/aws-ebs/hypershift/mgmt/generated/v1_service_aws-ebs-csi-driver-operator-metrics.yamlis excluded by!**/generated/**assets/csidriveroperators/aws-ebs/standalone/generated/v1_service_aws-ebs-csi-driver-operator-metrics.yamlis excluded by!**/generated/**assets/csidriveroperators/azure-disk/hypershift/mgmt/generated/v1_service_azure-disk-csi-driver-operator-metrics.yamlis excluded by!**/generated/**assets/csidriveroperators/azure-disk/standalone/generated/v1_service_azure-disk-csi-driver-operator-metrics.yamlis excluded by!**/generated/**assets/csidriveroperators/azure-file/hypershift/mgmt/generated/v1_service_azure-file-csi-driver-operator-metrics.yamlis excluded by!**/generated/**assets/csidriveroperators/azure-file/standalone/generated/v1_service_azure-file-csi-driver-operator-metrics.yamlis excluded by!**/generated/**assets/csidriveroperators/openstack-cinder/hypershift/mgmt/generated/v1_service_openstack-cinder-csi-driver-operator-metrics.yamlis excluded by!**/generated/**assets/csidriveroperators/openstack-cinder/standalone/generated/v1_service_openstack-cinder-csi-driver-operator-metrics.yamlis excluded by!**/generated/**assets/csidriveroperators/openstack-manila/hypershift/mgmt/generated/v1_service_manila-csi-driver-operator-metrics.yamlis excluded by!**/generated/**assets/csidriveroperators/openstack-manila/standalone/generated/openshift-cluster-csi-drivers_v1_service_manila-csi-driver-operator-metrics.yamlis excluded by!**/generated/**
📒 Files selected for processing (9)
assets/csidriveroperators/aws-ebs/base/01_service.yamlassets/csidriveroperators/azure-disk/base/01_service.yamlassets/csidriveroperators/azure-file/base/01_service.yamlassets/csidriveroperators/gcp-pd/01_service.yamlassets/csidriveroperators/ibm-vpc-block/01_service.yamlassets/csidriveroperators/openstack-cinder/base/01_service.yamlassets/csidriveroperators/openstack-manila/base/09_service.yamlassets/csidriveroperators/powervs-block/hypershift/mgmt/08_service.yamlassets/csidriveroperators/powervs-block/standalone/08_service.yaml
🚧 Files skipped from review as they are similar to previous changes (6)
- assets/csidriveroperators/aws-ebs/base/01_service.yaml
- assets/csidriveroperators/openstack-manila/base/09_service.yaml
- assets/csidriveroperators/openstack-cinder/base/01_service.yaml
- assets/csidriveroperators/azure-disk/base/01_service.yaml
- assets/csidriveroperators/ibm-vpc-block/01_service.yaml
- assets/csidriveroperators/azure-file/base/01_service.yaml
|
/retest-required |
|
/label tide/merge-method-squash /lgtm I checked that all CSI driver operators in the e2e test above (+ cinder+manila) have: |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsafrane, mpatlasov 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 |
|
/remove-label tide/merge-method-squash White the comment titles are not very useful, the commit message has information that's worth preserving. |
|
/test hypershift-e2e-aks |
|
/label tide/merge-method-squash |
|
/retest-required |
|
/test hypershift-e2e-aks |
|
/override ci/prow/hypershift-e2e-aks The test doesn't give us any useful signals now, it is perma-failing these days. See also how it failed in: |
|
@mpatlasov: Overrode contexts on behalf of mpatlasov: ci/prow/hypershift-e2e-aks 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-sigs/prow repository. |
|
Pre-merge verification results looks good. Test results are added here |
|
/verified by @radeore and CI |
|
@radeore: This PR has been marked as verified by 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/test hypershift-aws-e2e-external |
|
@mpatlasov: all tests passed! 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-sigs/prow repository. I understand the commands that are listed here. |
Before this commit the following operators generated self-signed certificates:
This commit add new Service object for each of them with special annotation which ask service-ca-operator to create certificates for us. Also, this commit ensures the operator's Pods mount those certificates to well-known path (
/var/run/secrets/serving-cert).There is also a cosmetic change for
vmware-vsphere-csi-driver-operator: removeoptional: trueforvmware-vsphere-csi-driver-operator-metrics-serving-cert. This must ensure that this operator will always wait for Secret containing certificates.Summary by CodeRabbit
New Features
Behavior Change