-
Notifications
You must be signed in to change notification settings - Fork 144
Separate kustomization from image creation and fix HSM password loading for adoption #3579
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
base: main
Are you sure you want to change the base?
Separate kustomization from image creation and fix HSM password loading for adoption #3579
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
ec39732 to
da628ba
Compare
06b70cc to
eed36b6
Compare
eed36b6 to
dec9753
Compare
|
is this still in work in progress? |
This commit separates the Barbican Proteccio playbook into two parts to support adoption scenarios where image creation and kustomization need to happen at different times: - barbican-prepare-proteccio.yml: Creates custom Barbican images with HSM client and sets up OpenShift secrets - barbican-enable-proteccio.yml: Applies kustomization to configure Barbican to use Proteccio HSM Additionally, this adds support for loading the HSM password from a Zuul secret file (/var/tmp/qe-secrets/proteccio_pin.yaml) when the cifmw_hsm_password variable is not already defined. This file is created by the qe-creds-crc.yaml pre-run playbook in the components-integration-config repository. This change is based on PR openstack-k8s-operators#3543 by Ade Lee, with the addition of the HSM password file loading logic. Jira: OSPRH-20112 Signed-off-by: Mauricio Harley <mharley@redhat.com>
Add early validation to fail with a descriptive error message when the HSM password (cifmw_hsm_password) is neither defined as a variable nor available in the Zuul secrets file. This addresses the scenario where both conditions are unmet: - cifmw_hsm_password is not defined in the job configuration - The secrets file /var/tmp/qe-secrets/proteccio_pin.yaml does not exist Previously, this would cause the playbook to continue and fail later with an unhelpful "cifmw_hsm_password is undefined" error. Now it fails early with a clear message explaining the two options to resolve it. Signed-off-by: Mauricio Harley <mharley@redhat.com>
dec9753 to
e85aaeb
Compare
Hi, @evallesp. Thanks for raising this. No, it's ready for review. |
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/e9060b1562224aa69dd0adb8e65366aa ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 44m 43s |
|
recheck |
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.
Changes lgtm, Are there any changes pending downstream that need to be merged before/after this one? Let us know if we have to hold off on merging at all. I ask because I see the barbican-enable-proteccio.yml playbook is used in one job downstream, so if any changes need to be there we can wait for those changes to be ready.
Thanks!
holding my approval since we need to be sure about this. |
Playbook Separation (based on PR #3543)
When performing Barbican adoption from OSP 17.1 to RHOSO 18, the image
creation and kustomization need to happen at different times. This PR
separates the logic into:
HSM client software and sets up OpenShift secrets (certificates and login)
the Barbican control plane to use Proteccio HSM
HSM Password Loading Fix
Added logic to load
cifmw_hsm_passwordfrom the Zuul secret file at/var/tmp/qe-secrets/proteccio_pin.yamlwhen the variable is not alreadydefined. This file is created by the
qe-creds-crc.yamlpre-run playbookin the
components-integration-configrepository.This fixes the issue where the playbook would fail with:
'cifmw_hsm_password' is undefined