Repository navigation
Conversation
Allow injecting trusted CA certificates into provisioned hosts via an optional caCertsSecret and caCertsRemoveDefaults, matching cloud-init's ca_certs module. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@dsedgmen: This pull request references RHOSRFE-639 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the feature request to target the "5.1.0" version, but no target version was set. 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dsedgmen The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
Hi @dsedgmen. Thanks for your PR. I'm waiting for a openstack-k8s-operators member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
Not sure why this is needed, we already have the install-certs dataplane service that installs the required CA certs on EDPM nodes. If a customer really wants custom userdata per node, OpenStackDataPlaneNodeSet already supports custom userData per node https://github.com/openstack-k8s-operators/openstack-operator/blob/main/api/dataplane/v1beta1/common.go#L116 |
|
Build succeeded (check pipeline). ✔️ openstack-baremetal-operator-content-provider SUCCESS in 2h 46m 05s |
The problem with the install-certs is it does not actually update the ca trust store it just copies it into /var/lib/openstack/cacerts/{{ service }} If you are talking about the bootstrap.yml which imports caBundleSecretName. This does not work for importing ca for satellite and container registries because it is not run until after https://github.com/openstack-k8s-operators/edpm-ansible/blob/main/playbooks/redhat.yml So we would either need to change the order or structure of playbooks so the certificate is imported before the redhat and download-cache playbooks are run or implement the ca-trusts earlier like using the userdata The problem with using the custom userData is it overwrites the templated data from the operator. |
I think redhat service runs the rhc system role first, and that role should install Satellite CA into the trust store. FWIW rhc_repo_ca_cert_fetch_from_satellite: true ansible var should help pull the certs and update trust store. I think you can set the service list to have bootstrap before download-cache which is the case in upstream ci. |
yes, but none of this really invalidates the RFE, it is always going to be better to import the ca and update the trust earlier then later. Also the fact the CI is using a hack to work, shows it is broken. So from my point of view we should either import the CA using the userData or it should be the first task by default. |
I would rather keep the default cloud-init functionality to a minimum, just what's needed to make the node reachable, errors with cloud-init execution are not visible to the operator (BMH marked provisioned regardless) to only surface later during service deployment. That would also duplicate what bootstrap role is already doing. We will discuss and change the default order of services to have bootstrap before download-cache and or anything else required during deployment instead. |
Summary
ca_certsat creation time.caCertsSecret(PEM certs / multi-PEM bundles) andcaCertsRemoveDefaultstoOpenStackBaremetalSet, and templates them into generated userdata.Test plan
go test ./internal/openstackbaremetalset/make test(covers new "BMH provisioned with CA certs secret" case)spec.caCertsSecret(+ optionalcaCertsRemoveDefaults), provision a BMH, and confirm userdata containsca_certs.trusted(andremove_defaultswhen enabled)caCertsSecretstill generate userdata without aca_certsblockJIRA: RHOSRFE-639
Made with Cursor