-
Notifications
You must be signed in to change notification settings - Fork 102
tests: Refactor custom certificate management for kuttl tests #1654
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
Merged
openshift-merge-bot
merged 1 commit into
openstack-k8s-operators:main
from
stuggi:kuttl_custom_cert
Oct 23, 2025
Merged
tests: Refactor custom certificate management for kuttl tests #1654
openshift-merge-bot
merged 1 commit into
openstack-k8s-operators:main
from
stuggi:kuttl_custom_cert
Oct 23, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b2dd602 to
1a84536
Compare
1a84536 to
d102b5d
Compare
Contributor
Author
|
/retest |
d102b5d to
2a57186
Compare
2a57186 to
d325807
Compare
Replace hardcoded certificate placeholders with dynamic certificate injection using ConfigMaps and kustomize replacements. Key Changes: Certificate Management: - Update osp_check_route_cert.sh to fetch certificates dynamically from secrets instead of using hardcoded values - Add verify_route_override_certs.sh to validate OpenStackControlPlane certificate overrides match secret content - Add prepare_placement_certs.sh to create ConfigMap from certificate secrets for kustomize replacements Kustomize Integration: - Update kustomization.yaml to use ConfigMap as a resource for replacements - Remove hardcoded namespace from replacement sources (fixes KUTTL test execution) - Generate placement-cert-data.yaml file for kustomize to reference - Configure replacements to inject certificate data from ConfigMap into OpenStackControlPlane spec - Add placement-cert-data.yaml to .gitignore (generated at runtime) - Remove hardcoded certificate placeholders (CERT123, KEY123, CACERT123) from assertion files Test Flow: - Step 01: Deploy initial OpenStackControlPlane with TLS enabled - Step 02: Create custom route secrets and generate ConfigMap file - Step 02-assert: Verify secrets and ConfigMap exist (declarative checks) - Step 03: Apply kustomize patch with custom certificates - Step 03-assert: Verify OpenStackControlPlane is ready - Step 04-assert: Validate route certificates match custom certs Benefits: - Tests use actual cert-manager generated certificates - No maintenance of hardcoded certificate values - Kustomize can reference ConfigMap from generated file - Multi-level validation (secret → route, secret → override) - Proper test sequencing (certificates checked after patching) - Reusable scripts work for any service - Cleaner, consolidated documentation Jira: https://issues.redhat.com/browse/OSPRH-8984 AssistedBy: cloude-4-sonnet Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
d325807 to
97cfb4e
Compare
Contributor
Author
|
/retest |
1 similar comment
Contributor
Author
|
/retest |
Deydra71
approved these changes
Oct 23, 2025
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Deydra71, stuggi 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 |
89bc9f2
into
openstack-k8s-operators:main
9 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replace hardcoded certificate placeholders with dynamic certificate injection using ConfigMaps and kustomize replacements.
Key Changes:
Certificate Management:
Kustomize Integration:
Test Flow:
Benefits:
Jira: https://issues.redhat.com/browse/OSPRH-8984
AssistedBy: cloude-4-sonnet