Skip to content

feat: Route TLS - #11

Merged
DerekRoberts merged 28 commits into
mainfrom
feat/tls-route-provisioner
Sep 3, 2026
Merged

DerekRoberts merged 28 commits into
mainfrom
feat/tls-route-provisioner

Conversation

@DerekRoberts

@DerekRoberts DerekRoberts commented Aug 6, 2026 •

Copy link
Copy Markdown
Member

Adds the Route TLS composite action (route-tls): GitHub secrets in, OpenShift Route with custom TLS out. openssl checks the PEMs; existing Route TLS is snapshotted before overwrite.

See route-tls/README.md. Populate TLS_CERTIFICATE, TLS_PRIVATE_KEY, and TLS_CA_CERTIFICATE on a prod GitHub Environment.

@DerekRoberts DerekRoberts changed the title feat/tls route provisioner feat: tls route provisioner Aug 6, 2026
@DerekRoberts DerekRoberts moved this to Active in DevOps (NR) Aug 7, 2026
@DerekRoberts DerekRoberts self-assigned this Aug 7, 2026
@DerekRoberts DerekRoberts moved this from Active to Waiting in DevOps (NR) Aug 11, 2026
@DerekRoberts
DerekRoberts marked this pull request as draft August 11, 2026 01:01
@DerekRoberts
DerekRoberts requested a lite review from Copilot August 11, 2026 01:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Introduces a new composite GitHub Action (tls-route-provisioner) to provision OpenShift TLS vanity routes, including local certificate/key validation and an archival backup of existing route TLS material, and wires in documentation plus a basic CI dry-run workflow.

Changes:

  • Added tls-route-provisioner composite action to validate TLS inputs, optionally back up existing route certs/keys, and apply a generated Route manifest.
  • Added action-specific README plus linked the action from the repo root README.
  • Added a PR/push workflow to exercise the action in dry_run mode using generated dummy certs.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.

File Description
tls-route-provisioner/action.yml New composite action implementing TLS validation, OpenShift login/backup, and Route YAML generation/apply.
tls-route-provisioner/README.md New action documentation with usage snippet and inputs table.
README.md Adds the new action to the repo’s top-level catalog (and shifts numbering).
.github/workflows/pr-open.yml CI workflow that dry-runs the action using generated test certificates.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tls-route-provisioner/action.yml Outdated
Comment thread tls-route-provisioner/action.yml Outdated
Comment thread tls-route-provisioner/action.yml Outdated
Comment thread tls-route-provisioner/action.yml Outdated
Comment thread tls-route-provisioner/action.yml Outdated
Comment thread tls-route-provisioner/README.md Outdated
Comment thread tls-route-provisioner/README.md Outdated
Comment thread README.md
@DerekRoberts
DerekRoberts force-pushed the feat/tls-route-provisioner branch from a97ef75 to 7c05acc Compare August 11, 2026 01:43
Comment thread .github/workflows/pr-open.yml Fixed
@DerekRoberts
DerekRoberts force-pushed the feat/tls-route-provisioner branch from c82c3a5 to 0aab8eb Compare September 2, 2026 17:19
Deny GITHUB_TOKEN at workflow and job scope. Checkout only needs the public tree.
That runner is a login+checkout action and was invoked with no with: block, so oc_server was empty. Download the client from the OpenShift mirror instead; provision.sh already logs in.
@DerekRoberts
DerekRoberts marked this pull request as ready for review September 2, 2026 21:07
@DerekRoberts
DerekRoberts requested a balanced review from Copilot September 2, 2026 21:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Credential handling and archival behavior currently introduce security and backup-reliability risks.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 5/6 changed files
  • Comments generated: 7
  • Review effort level: Balanced

Comment thread route-tls/action.yml Outdated
Comment thread route-tls/provision.sh Outdated
Comment thread route-tls/provision.sh
Comment thread route-tls/provision.sh Outdated
Comment thread route-tls/provision.sh
Comment thread route-tls/provision.sh
Comment thread route-tls/provision.sh
The action sets spec.host and spec.tls; a vanity DNS name is only one caller. hostname replaces vanity_url; backup Secrets use backup-type=route-tls.
Keep naming as Route TLS, drop frontend-specific Service examples, and treat the local CLI as secondary.
@DerekRoberts DerekRoberts changed the title feat: tls route provisioner feat: Route TLS Sep 2, 2026
PR-close sweeps by app= and would delete a TLS Route if we labeled it. Leave the Route unlabeled and name it <repository>-vanity-url unless the caller overrides.
Without spec.tls.caCertificate the leaf cannot chain to the public roots.
Gold API login always skips API TLS verify. That is not a caller choice and is unrelated to Route certificates.
Shrink the bash ADR, require the CA to have issued the leaf, pin the oc client to 4.16.45, and snapshot ca.crt alongside cert and key so a bad apply can be undone.
Pass oc_namespace, oc_server, and oc_token through so the runner can log in. Client version stays the runner default.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

TLS hostname handling, sensitive-file cleanup, error reporting, and cluster authentication have unresolved correctness and security issues.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

route-tls/provision.sh:124

  • In GitHub jobs, RUNNER_TEMP is set, so the generated Route manifest containing the private key is outside WORKDIR and survives the EXIT cleanup. Keep non-dry-run output in the protected temporary directory so the key is deleted after apply.
  ROUTE_OUT="${RUNNER_TEMP:-$WORKDIR}/route.yml"
  • Files reviewed: 5/6 changed files
  • Comments generated: 3
  • Review effort level: Balanced

Comment thread route-tls/provision.sh Outdated
Comment thread route-tls/provision.sh Outdated
Comment thread route-tls/provision.sh Outdated
Skip oc login when already authenticated so GitHub does not re-send the long-lived token. Compare DNS names case-insensitively, and die with a specific error if openssl cannot parse the cert or key.
@DerekRoberts
DerekRoberts merged commit 9d7230d into main Sep 3, 2026
3 checks passed
@DerekRoberts
DerekRoberts deleted the feat/tls-route-provisioner branch September 3, 2026 00:34
@github-project-automation github-project-automation Bot moved this from Waiting to Done in DevOps (NR) Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants