APS-4720: Stage edge signing secrets separately from Kong restart - #15
APS-4720: Stage edge signing secrets separately from Kong restart#15Elson9 wants to merge 3 commits into
Conversation
| ```sh | ||
| helm upgrade ${EDGE_ID} oci://ghcr.io/bcgov/aps-devops/sdx-edge \ | ||
| --reuse-values \ | ||
| --set bootstrap.stageSecret=false \ |
There was a problem hiding this comment.
Could we clear bootstrap.tls.token as part of this promotion upgrade, or otherwise remove and recreate the bootstrap Job? --reuse-values keeps the staged token, so the same *-boot-<token hash> Job remains rendered while stageSecret changes its pod template from staging to live-secret writes. Kubernetes Job pod templates are immutable, so a stage-to-promote upgrade will be rejected while that completed Job still exists. If TTL has already removed it, Helm can instead recreate the bootstrap Job with the consumed one-time token. A consecutive stage/promote test would help pin this down.
There was a problem hiding this comment.
Thanks for tackling this. I traced the --reuse-values merge in Helm 3.20, and null unfortunately does not clear a value stored by the previous release: the null entry is removed during coalescing, then the old token is supplied again when Helm renders. That means this command still renders the same bootstrap Job with stageSecret=false and runs into the immutable pod template. Could we use an explicit empty string instead (--set-string bootstrap.tls.token="") and cover a real stage-to-promote reuse-values sequence? An empty string remains an explicit override and rendered correctly in my check.
…mote after the hook
| ```sh | ||
| helm upgrade ${EDGE_ID} oci://ghcr.io/bcgov/aps-devops/sdx-edge \ | ||
| --reuse-values \ | ||
| --set bootstrap.stageSecret=false \ |
There was a problem hiding this comment.
Thanks for tackling this. I traced the --reuse-values merge in Helm 3.20, and null unfortunately does not clear a value stored by the previous release: the null entry is removed during coalescing, then the old token is supplied again when Helm renders. That means this command still renders the same bootstrap Job with stageSecret=false and runs into the immutable pod template. Could we use an explicit empty string instead (--set-string bootstrap.tls.token="") and cover a real stage-to-promote reuse-values sequence? An empty string remains an explicit override and rendered correctly in my check.
|
|
||
| This writes `{release}-client-next` and does **not** restart Kong. | ||
|
|
||
| 2. Sign the CSR and publish the new public key with `sdx-keys.r1` |
There was a problem hiding this comment.
The staging Job already runs step ca sign and stores only tls.crt and tls.key in client-next; it does not leave a CSR for an operator to sign afterward. I think this should explain how to extract tls.crt and pass it as certificatePem to operation=rotate, or point to the automation that performs that handoff.
Summary
bootstrap.stageSecretwrites{release}-client-nextwithout restarting.rotation.promotecopies the staged secret to live client/server TLS secrets and rolling-restarts Kong (chart 0.3.6).Test plan
stageSecret=truecreates-client-nextand skip Kong restart (helm template)rotation.promote=truepromotes next → live and restarts (helm template)