Skip to content

Add reencrypt route support to RHACS role#141

Merged
wkulhanek merged 8 commits into
mainfrom
add-rhacs-reencrypt-route-support
May 1, 2026
Merged

Add reencrypt route support to RHACS role#141
wkulhanek merged 8 commits into
mainfrom
add-rhacs-reencrypt-route-support

Conversation

@treddy08
Copy link
Copy Markdown
Contributor

@treddy08 treddy08 commented May 1, 2026

  • Add variable ocp4_workload_rhacs_enable_reencrypt_route to enable/disable reencrypt route
  • Extract CA certificate chain from rhacs-central-tls secret
  • Configure Central CR with reencrypt route and destinationCACertificate
  • Hardcoded to use rhacs-central-tls secret name
  • Role fails if secret doesn't exist when reencrypt is enabled

The regex removes the first certificate (server cert) from the chain, leaving only the CA certificates needed for backend verification.

- Add variable ocp4_workload_rhacs_enable_reencrypt_route to enable/disable reencrypt route
- Extract CA certificate chain from rhacs-central-tls secret
- Configure Central CR with reencrypt route and destinationCACertificate
- Hardcoded to use rhacs-central-tls secret name
- Role fails if secret doesn't exist when reencrypt is enabled

The regex removes the first certificate (server cert) from the chain,
leaving only the CA certificates needed for backend verification.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
treddy08 and others added 7 commits May 1, 2026 12:33
- Get central-reencrypt route when reencrypt is enabled
- Display reencrypt route URL in user info
- Save reencrypt route URL to user data
- Conditionally includes info only when enabled

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Changed from folded scalar (>-) to literal scalar (|-) to preserve newlines
- Removed multiline=True from regex_replace (not needed)
- Changed indent filter to indent first line (first=True)
- This ensures the certificate is properly formatted in the YAML

The previous version was creating malformed YAML because the certificate
content wasn't being indented correctly.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Use [\s\S]*? pattern to properly match across newlines and remove
literal scalar (|-) to ensure regex processes correctly.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updated the CA certificate extraction for reencrypt routes to work
with both Let's Encrypt and ZeroSSL certificates by combining:
1. Intermediate CA certificates from the rhacs-central-tls secret
2. Full cluster trusted CA bundle from openshift-config-managed

This ensures the router can verify certificate chains regardless of
which certificate authority cert-manager uses.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Use YAML folded scalar to keep line under 150 characters limit.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Split long regex_replace line to keep under 150 characters.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@wkulhanek wkulhanek left a comment

Choose a reason for hiding this comment

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

Awesome!

@wkulhanek wkulhanek merged commit 2a48192 into main May 1, 2026
1 check passed
@wkulhanek wkulhanek deleted the add-rhacs-reencrypt-route-support branch May 1, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants