Skip to content

APS-4720: Stage edge signing secrets separately from Kong restart - #15

Open
Elson9 wants to merge 9 commits into
devfrom
feature/aps-4720-sdx-edge-key-staging
Open

APS-4720: Stage edge signing secrets separately from Kong restart#15
Elson9 wants to merge 9 commits into
devfrom
feature/aps-4720-sdx-edge-key-staging

Conversation

@Elson9

@Elson9 Elson9 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Split edge key bootstrap from Kong restart: bootstrap.stageSecret writes {release}-client-next without restarting.
  • rotation.promote copies the staged secret to live client/server TLS secrets and rolling-restarts Kong (chart 0.3.6).

Test plan

  • stageSecret=true creates -client-next and skip Kong restart (helm template)
  • rotation.promote=true promotes next → live and restarts (helm template)
  • Default renewal still restarts (helm template)
  • Cluster apply of stage/promote on a real runtime group

@Elson9
Elson9 marked this pull request as ready for review August 19, 2026 19:59
@Elson9
Elson9 requested review from ikethecoder and phowells August 19, 2026 20:05
Comment thread sdx/README.md
Comment thread sdx/chart/sdx-edge/templates/job-cert-promote.yaml Outdated
@Elson9
Elson9 requested a review from phowells August 25, 2026 22:44
Comment thread sdx/README.md
Comment thread sdx/chart/sdx-edge/templates/job-cert-promote.yaml Outdated
Comment thread sdx/README.md Outdated
@Elson9
Elson9 requested a review from phowells August 28, 2026 22:50
Comment thread sdx/chart/sdx-edge/templates/job-cert-renewal.yaml Outdated
Comment thread sdx/README.md Outdated
Comment thread sdx/README.md
@Elson9
Elson9 requested a review from phowells September 1, 2026 16:43

@phowells phowells 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.

Merge conflicts need to be resolved.

Comment thread sdx/chart/sdx-edge/templates/job-cert-renewal.yaml Outdated
Keep the 0.3.5 reuse-values render check, and document that bootstrap is now a pre-upgrade hook.
@Elson9

Elson9 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@phowells fixed merge conflicts

@Elson9
Elson9 requested a review from phowells September 2, 2026 20:30
Comment thread sdx/README.md Outdated
`--reuse-values` persists flags in the release, so stage and promote must
clear one-shot values instead of only toggling `stageSecret`.

1. Create a one-time CA token, then bootstrap with staging. Helm waits for

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.

I think the merge changed the lifecycle behind this command. The bootstrap Job is now a pre-install,pre-upgrade hook, while the token Secret it mounts—and the ServiceAccount/RBAC it uses—are ordinary release resources. Helm runs the hook before those resources are created or updated, so a fresh install has neither dependency, and this staging upgrade will either see the previous token Secret or, after the documented promotion cleared it, no Secret at all. Could we make the hook dependencies earlier pre-hooks (using hook weights), or return this Job to the normal release lifecycle, and then exercise a post-merge stage → promote run? The earlier live test covered the pre-merge, non-hook behaviour.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@phowells Agreed — the merge pulled in dev's pre-install,pre-upgrade hook while the token Secret and sdx-job-cert-bootstrap SA/RBAC stayed ordinary release resources, so a staging upgrade would run the Job before those were created or updated.

Hook-weighting the dependencies would also turn that SA into a hook, and the promote Job still uses it as a post-upgrade hook. Safer to put bootstrap back on the normal release lifecycle (this PR's original shape). Stage again uses --wait --wait-for-jobs.

I have not re-run stage → promote on a live edge since this revert; I can do that next on the same Gold pzgw path.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@phowells Re-ran stage → promote on Gold pzgw / b8840c-dev (local chart) after the revert. Stage Job was a normal release resource, wrote client-next, Kong stayed at gen 133. Promote cleared the token with no immutable-spec error and rolled Kong to 134, then rotation.promote=false. Chart bumped to 0.3.7 so we do not republish over GHCR 0.3.6.

A pre-upgrade hook runs before the token Secret and ServiceAccount are created or updated, so staging would see a stale or missing Secret.
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