Skip to content

Conversation

stephenfin
Copy link
Contributor

What this PR does / why we need it:

cloud-credential-operator now supports syncing CA certs from the root credential secret to the generated credentials secrets. If necessary, CCO expects the CA cert to be provided in the cacert key and will place it in the same location in the generated secrets. Start doing the same in control-plane-operator, which allows us to significantly simplify the assets used in cluster-storage-operator and csi-operator.

Note that we are intentionally not changing how CA certs are managed for cluster-cloud-controller-manager-operator. There's a good reason for this, and a note is left inline to that effect.

/hold

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:

Per $subject.

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 25, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 25, 2025

@stephenfin: This pull request references OSASINFRA-3732 which is a valid jira issue.

In response to this:

What this PR does / why we need it:

cloud-credential-operator now supports syncing CA certs from the root credential secret to the generated credentials secrets. If necessary, CCO expects the CA cert to be provided in the cacert key and will place it in the same location in the generated secrets. Start doing the same in control-plane-operator, which allows us to significantly simplify the assets used in cluster-storage-operator and csi-operator.

Note that we are intentionally not changing how CA certs are managed for cluster-cloud-controller-manager-operator. There's a good reason for this, and a note is left inline to that effect.

/hold

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:

Per $subject.

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/needs-area labels Feb 25, 2025
Copy link
Contributor

openshift-ci bot commented Feb 25, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release and removed do-not-merge/needs-area labels Feb 25, 2025
// cluster-storage-operator now uses the certs from 'cacert', meaning
// this is no longer necessary. It is only kept here temporarily to
// ease upgrades. Remove in 4.20+
secret.Data[CABundleKey] = caCertData
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed there are no references to this on a running HCP cluster:

❯ oc get -A pods -o yaml | grep --group-separator=$'\n---\n' -e '\bca-bundle.pem\b' -B 5 -A 2
        defaultMode: 420
        secretName: openstack-cinder-csi-driver-node-metrics-serving-cert
    - configMap:
        defaultMode: 420
        items:
        - key: ca-bundle.pem
          path: ca-bundle.pem
        name: cloud-conf
        optional: true

---

        secretName: serving-cert
    - configMap:
        defaultMode: 420
        items:
        - key: ca-bundle.crt
          path: tls-ca-bundle.pem
        name: trusted-ca
      name: trusted-ca

---

      name: service-ca
    - configMap:
        defaultMode: 420
        items:
        - key: ca-bundle.crt
          path: tls-ca-bundle.pem
        name: trusted-ca-bundle
      name: trusted-ca-bundle

---

      name: metrics-client-ca
    - configMap:
        defaultMode: 420
        items:
        - key: ca-bundle.crt
          path: tls-ca-bundle.pem
        name: alertmanager-trusted-ca-bundle
      name: alertmanager-trusted-ca-bundle

---

      name: prometheus-k8s-db
    - configMap:
        defaultMode: 420
        items:
        - key: ca-bundle.crt
          path: tls-ca-bundle.pem
        name: prometheus-trusted-ca-bundle
      name: prometheus-trusted-ca-bundle

---

      name: metrics-client-ca
    - configMap:
        defaultMode: 420
        items:
        - key: ca-bundle.crt
          path: tls-ca-bundle.pem
        name: telemeter-trusted-ca-bundle-56c9b9fa8d9gs
        optional: true

// csi-operator) consume configuration from this secret: cinder sources it
// from the config map, and manila does its own special thing. Remove in
// 4.20+
secret.Data[CloudConfigKey] = []byte(config)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto:

❯ oc get -A pods -o yaml | grep --group-separator=$'\n---\n' -e '\bcloud.conf\b' -B 5 -A 2                                                                                                                                                                                                                                                                                                                                                 
      - --v=2                                                                                                                                                                                                                                                                                                                                                                                                                              
      env:                                                                                                                                                                                                                                                                                                                                                                                                                                 
      - name: CSI_ENDPOINT                                                                                                                                                                                                                                                                                                                                                                                                                 
        value: unix://csi/csi.sock                                                                                                                                                                                                                                                                                                                                                                                                         
      - name: CLOUD_CONFIG                                                                                                                                                                                                                                                                                                                                                                                                                 
        value: /etc/kubernetes/config/cloud.conf                                                                                                                                                                                                                                                                                                                                                                                           
      image: registry.build11.ci.openshift.org/ci-ln-6gzd92b/stable@sha256:9ec419f3de22d194cabf4f24f160c5f5e75485e8fc58dca4178869e357463629                                                                                                                                                                                                                                                                                                
      imagePullPolicy: IfNotPresent                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                           
---                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                           
    - configMap:                                                                                                                                                                                                                                                                                                                                                                                                                           
        defaultMode: 420                                                                                                                                                                                                                                                                                                                                                                                                                   
        items:                                                                                                                                                                                                                                                                                                                                                                                                                             
        - key: ca-bundle.pem                                                                                                                                                                                                                                                                                                                                                                                                               
          path: ca-bundle.pem                                                                                                                                                                                                                                                                                                                                                                                                              
        name: cloud-conf                                                                                                                                                                                                                                                                                                                                                                                                                   
        optional: true                                                                                                                                                                                                                                                                                                                                                                                                                     
      name: cacert                                                                                                                                                                                                                                                                                                                                                                                                                         
    - configMap:                                                                                                                                                                                                                                                                                                                                                                                                                           
        defaultMode: 420                                                                                                                                                                                                                                                                                                                                                                                                                   
        items:                                                                                                                                                                                                                                                                                                                                                                                                                             
        - key: cloud.conf                                                                                                                                                                                                                                                                                                                                                                                                                  
          path: cloud.conf
        name: cloud-conf
      name: config-cinderplugin
    - name: secret-cinderplugin

@stephenfin stephenfin marked this pull request as ready for review March 12, 2025 16:48
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 12, 2025
@openshift-ci openshift-ci bot requested review from csrwng and hasueki March 12, 2025 16:49
cloud-credential-operator now supports syncing CA certs from the root
credential secret to the generated credentials secrets. If necessary,
CCO expects the CA cert to be provided in the `cacert` key and will
place it in the same location in the generated secrets. Start doing the
same in control-plane-operator, which allows us to significantly
simplify the assets used in cluster-storage-operator and csi-operator.

Note that we are intentionally *not* changing how CA certs are managed
for cluster-cloud-controller-manager-operator. There's a good reason for
this, and a note is left inline to that effect.

Signed-off-by: Stephen Finucane <[email protected]>
We'll actually resolve this separately to avoid conflating things in one
PR.

We also fix a type and group two similar secrets that we are creating.

Signed-off-by: Stephen Finucane <[email protected]>
@EmilienM
Copy link
Member

/retest
/test e2e-openstack-aws

@EmilienM
Copy link
Member

/lgtm
/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 17, 2025
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 17, 2025
@EmilienM
Copy link
Member

@EmilienM
Copy link
Member

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 17, 2025
@stephenfin
Copy link
Contributor Author

/unhold

We don't need the CSI changes to land to start testing this, as it's effectively a just no-op without them. In fact, it'd probably be better have the Hypershift change land first so that we can easily test the CSI changes.

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 27, 2025
@EmilienM
Copy link
Member

/lgtm

@csrwng
Copy link
Contributor

csrwng commented Apr 1, 2025

/approve
/retest-required

Copy link
Contributor

openshift-ci bot commented Apr 1, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: csrwng, stephenfin

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 Apr 1, 2025
@stephenfin
Copy link
Contributor Author

/test Red Hat Konflux / hypershift-operator-main-on-pull-request

Copy link
Contributor

openshift-ci bot commented Apr 2, 2025

@stephenfin: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test e2e-aks
/test e2e-aks-4-18
/test e2e-aws
/test e2e-aws-4-18
/test e2e-aws-override
/test e2e-aws-upgrade-hypershift-operator
/test e2e-kubevirt-aws-ovn-reduced
/test images
/test security
/test unit
/test verify

The following commands are available to trigger optional jobs:

/test e2e-aws-karpenter-core
/test e2e-aws-metrics
/test e2e-aws-techpreview
/test e2e-azure-aks-ovn-conformance
/test e2e-conformance
/test e2e-kubevirt-aws-ovn
/test e2e-kubevirt-azure-ovn
/test e2e-kubevirt-metal-conformance
/test e2e-openstack-aws
/test e2e-openstack-aws-conformance
/test e2e-openstack-aws-csi-cinder
/test e2e-openstack-aws-csi-manila
/test e2e-openstack-aws-nfv
/test okd-scos-e2e-aws-ovn
/test okd-scos-images

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-hypershift-main-e2e-aks
pull-ci-openshift-hypershift-main-e2e-aws
pull-ci-openshift-hypershift-main-e2e-aws-upgrade-hypershift-operator
pull-ci-openshift-hypershift-main-e2e-kubevirt-aws-ovn-reduced
pull-ci-openshift-hypershift-main-images
pull-ci-openshift-hypershift-main-okd-scos-e2e-aws-ovn
pull-ci-openshift-hypershift-main-security
pull-ci-openshift-hypershift-main-unit
pull-ci-openshift-hypershift-main-verify

In response to this:

/test Red Hat Konflux / hypershift-operator-main-on-pull-request

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.

@stephenfin
Copy link
Contributor Author

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Apr 2, 2025
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 3283bb9 and 2 for PR HEAD 89f8be1 in total

@stephenfin
Copy link
Contributor Author

/retest

@csrwng
Copy link
Contributor

csrwng commented Apr 3, 2025

/override "Red Hat Konflux / hypershift-operator-main-enterprise-contract / hypershift-operator-main"

Copy link
Contributor

openshift-ci bot commented Apr 3, 2025

@csrwng: Overrode contexts on behalf of csrwng: Red Hat Konflux / hypershift-operator-main-enterprise-contract / hypershift-operator-main

In response to this:

/override "Red Hat Konflux / hypershift-operator-main-enterprise-contract / hypershift-operator-main"

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.

Copy link
Contributor

openshift-ci bot commented Apr 3, 2025

@stephenfin: all tests passed!

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.

@csrwng
Copy link
Contributor

csrwng commented Apr 4, 2025

/override "Red Hat Konflux / hypershift-operator-main-enterprise-contract / pr group"

@csrwng
Copy link
Contributor

csrwng commented Apr 4, 2025

/override "Red Hat Konflux / hypershift-operator-main-enterprise-contract / hypershift-operator-main"

Copy link
Contributor

openshift-ci bot commented Apr 4, 2025

@csrwng: Overrode contexts on behalf of csrwng: Red Hat Konflux / hypershift-operator-main-enterprise-contract / pr group

In response to this:

/override "Red Hat Konflux / hypershift-operator-main-enterprise-contract / pr group"

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.

Copy link
Contributor

openshift-ci bot commented Apr 4, 2025

@csrwng: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • Red Hat Konflux / hypershift-operator-main-enterprise-contract / hypershift-operator-main

Only the following failed contexts/checkruns were expected:

  • ci/prow/e2e-aks
  • ci/prow/e2e-aws
  • ci/prow/e2e-aws-upgrade-hypershift-operator
  • ci/prow/e2e-kubevirt-aws-ovn-reduced
  • ci/prow/e2e-openstack-aws
  • ci/prow/images
  • ci/prow/okd-scos-e2e-aws-ovn
  • ci/prow/security
  • ci/prow/unit
  • ci/prow/verify
  • pull-ci-openshift-hypershift-main-e2e-aks
  • pull-ci-openshift-hypershift-main-e2e-aws
  • pull-ci-openshift-hypershift-main-e2e-aws-upgrade-hypershift-operator
  • pull-ci-openshift-hypershift-main-e2e-kubevirt-aws-ovn-reduced
  • pull-ci-openshift-hypershift-main-e2e-openstack-aws
  • pull-ci-openshift-hypershift-main-images
  • pull-ci-openshift-hypershift-main-okd-scos-e2e-aws-ovn
  • pull-ci-openshift-hypershift-main-security
  • pull-ci-openshift-hypershift-main-unit
  • pull-ci-openshift-hypershift-main-verify
  • tide

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

In response to this:

/override "Red Hat Konflux / hypershift-operator-main-enterprise-contract / hypershift-operator-main"

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.

@sjenning sjenning merged commit 15ac478 into openshift:main Apr 4, 2025
15 of 19 checks passed
@stephenfin stephenfin deleted the OSASINFRA-3732 branch April 5, 2025 09:21
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. area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants