deploy: pass installation identity through its file contract - #5
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38b03c8ff0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| # shellcheck disable=SC2016 # envsubst takes the variable list literally | ||
| envsubst '$OAC_PUBLIC_URL $OAC_INSTALLATION_ID $OAC_DATABASE_URL' \ | ||
| envsubst '$OAC_PUBLIC_URL $OAC_DATABASE_URL' \ |
There was a problem hiding this comment.
Preserve identity substitution for older deployment templates
When source_branch/ref selects an earlier release, the checkout at .github/workflows/deploy.yml:187-190 replaces the working tree with that revision, so this command renders its older core-env.yaml.tpl, which still contains ${OAC_INSTALLATION_ID}. GNU envsubst --help confirms that with a SHELL-FORMAT, only the listed variables are substituted; therefore the ConfigMap retains the literal placeholder. Older Core versions reject it as a non-UUID, while the immediately preceding file-only Core starts without an installation identity and encounters the deployment conflict. This breaks the documented rollback flow in deploy/kubernetes/README.md:35; keep OAC_INSTALLATION_ID in the substitution whitelist even though the current template no longer uses it.
Useful? React with 👍 / 👎.
Current Core reads its installation identity exclusively from OAC_INSTALLATION_ID_FILE. The Kubernetes deployment still passes OAC_INSTALLATION_ID, so the upgraded Core does not load the existing Web-managed identity and exits with a deployment conflict.
Write the existing environment variable into the Core Secret's installation.id file, copy it with the other private files as user 65532/mode 0400, and pass only OAC_INSTALLATION_ID_FILE to Core. Include identity in the configuration digest so changes restart Pods. Keep the existing database identity, credentials and business implementation unchanged.
Validation: actionlint, rendered resource/Secret/copy/mount/digest checks, upstream Core check-config with a synthetic identity, git diff --check and independent review. The prior production version was restored Ready during repair.