Skip to content

CICD-400 · Preview environment TLS ​

Encyclopedia · Preview environments and developer experience · All snippets

Previous · CICD-399 · Next · CICD-401

1. Where it fits ​

  • Placement CI run step or authorized lab terminal.
  • Prerequisites trusted preview controller, disposable environment and scoped identities for external resources.
  • Platforms kubernetes, local-lab.
  • Parameters PR_NUMBER.

2. Copy the snippet ​

bash
[[ "${PR_NUMBER:?}" =~ ^[0-9]+$ ]]
kubectl -n "preview-$PR_NUMBER" wait --for=condition=Ready certificate/web-tls --timeout=180s

3. How it works ​

The numeric ID identifies the preview namespace. Waiting on the Certificate's Ready condition confirms minting state, while a real TLS request proves the selected route works.

4. Verify the result ​

Issuer and Certificate must exist. Probe the actual hostname with CICD-322 before posting it.

Validation syntax-validated (Bash parse). Status definitions.