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

OSASINFRA-3729: Add openstack-cacerts enhancement #1769

Closed
wants to merge 1 commit into from

Conversation

stephenfin
Copy link
Contributor

An enhancement to discuss upgrade options for https://issues.redhat.com/browse/OSASINFRA-3729.

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

openshift-ci-robot commented Mar 20, 2025

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

In response to this:

An enhancement to discuss upgrade options for https://issues.redhat.com/browse/OSASINFRA-3729.

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.

Copy link
Contributor

openshift-ci bot commented Mar 20, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign sdodson for approval. For more information see the Code Review Process.

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

@mdbooth
Copy link
Contributor

mdbooth commented Mar 20, 2025

@stephenfin I'm trying to find some user documentation links to reference on:

  • how an OpenStack custom CACert should be provided on installation
  • how this CACert should be rotated

I'm currently coming up blank, though. I'm sure it exists. Do you have it to hand? As well as being useful during review, I feel like we should reference it in this document.

EDIT: Looks like both are here: https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/installing_on_openstack/installing-openstack-installer-custom#installation-osp-describing-cloud-parameters_installing-openstack-installer-custom

@mdbooth
Copy link
Contributor

mdbooth commented Mar 20, 2025

I'd really like to see this process described from the cluster admin's perspective. e.g.:

Currently, to rotate the OpenStack CA cert, the cluster administrator must do X. With this enhancement they can instead do Y. We will continue to support X indefinitely.

We propose to implement this change as follows.

@mdbooth
Copy link
Contributor

mdbooth commented Mar 20, 2025

IIUC we currently have:

Secret kube-system/openstack-credentials containing keys:

  • clouds.yaml (the OpenStack credentials that we know and love)
  • clouds.conf (clouds.yaml translated into ini-style, probably nothing's reading this any more)

ConfigMap openshift-config/cloud-provider-config containing key:

  • ca-cert.pem containing a CA cert just for OpenStack

CCM uses:

  • credentials directly from kube-system? I'm guessing here, I don't know.
  • ca-cert.pem mounted directly from openshift-config/cloud-provider-config (or maybe openshift-config-managed, but probably not because bootstrap)

All other components (should) use credentials in their own namespace copied from kube-system via a CredentialsRequest. The CredentialsRequest copies kube-system/openstack-credentials, which does not contain the cacert, so other components must separately fetch it from openshift-config/cloud-provider-config (or probably openshift-config-managed because not bootstrap). As an OpenShift developer, this static CA cert is inconvenient to use from certain components which expect an optional cacert entry in the credentials secret.

You're proposing a new sync controller which would allow the user to either:

  • Continue to specify the CA cert in openshift-config/cloud-provider-config, or
  • Instead specify the CA cert as a cacert key in kube-system/openstack-credentials

Please can you correct all my mistakes?

Signed-off-by: Stephen Finucane <[email protected]>
Copy link
Contributor

openshift-ci bot commented Mar 27, 2025

@stephenfin: The following test 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/markdownlint a02b993 link true /test markdownlint

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.

- CAPO (as deployed by `cluster-capi-operator`) and ORC are both currently
broken on clouds using self-signed certs

[source-mapo]: https://github.com/openshift/machine-api-provider-openstack/blob/d2fce230a2df0cf3b47769f0118d6475f796cb35/pkg/clients/utils.go#L51-L64
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't know you could do this🤯

Comment on lines +120 to +121
* As an OpenShift administrator, I want to be able to rotate the CA cert used
for my cloud as easily as I can rotate my credentials.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this use case is correct, but I don't think it necessarily follows that the user expects the CA cert and cloud credentials to be in the same place. We want them to be managed from only one place each. Purely from the user's POV, I struggle to convince myself that it's important that they're both in the same place.

I see rotating a CA cert and rotating credentials as being quite different operations with quite different lifecycles. Do we have any evidence that users regularly do them at the same time?

for my cloud as easily as I can rotate my credentials.
* As an OpenShift administrator, I want to continue using my existing CA cert
rotation scripts for a transition period.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think there's a missing use case here:

  • As an OpenShift developer, I want to reduce my maintenance burden and the risk of bugs by ensuring that cloud credentials and the CA cert are presented to all consuming services in the same format.

I think this is where the desire to have them both in the same place comes from. The difference is that this is at the point of use, not the 'point of management' as exposed to the user.

@mdbooth
Copy link
Contributor

mdbooth commented Mar 27, 2025

To summarise a F2F discussion:

The proposal is that instead of modifying where the user puts the credentials and CA cert, we instead modify CCO to create credential secrets with an embedded CA cert, copying the CA cert from where it already lives in openshift-config. This means:

  • CAPO and ORC work
  • All the existing work to update operators to expect a combined CA cert continue to work
  • User processes don't change at all

We expected CCM to continue to be a snowflake because of the bootstrapping issue, but we noticed that in a deployed cluster the CCM is already using a credential generated by CCO. On further investigation, we found code suggesting that CCO runs temporarily on the bootstrap node. We should confirm this, but the implication is that CCM does not require special consideration.

@stephenfin
Copy link
Contributor Author

/close This has served its purpose now

@stephenfin stephenfin closed this Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants