feat: distribute chart updater App key to kustomize-cluster - #58
Merged
Conversation
Adds kustomize-cluster to the chart updater GitHub App private-key recipient list so its in-repo rotation workflow can mint makeitworkbot installation tokens. Branch protection on kustomize-cluster allows only the admins team and this App to complete pull-request merges, so the App token is required for the rotation workflow's unattended auto-merge. The App installation is organization-wide, so no installation change accompanies this recipient addition.
Contributor
OpenTofu TestOpenTofu test passed. View run output |
Contributor
OpenTofu PlanOpenTofu plan passed. View run outputOpenTofu will perform the following actions:
[REDACTED: potentially sensitive plan output]
[REDACTED: potentially sensitive plan output]
+ created_at = (known after apply)
+ id = (known after apply)
+ key_id = (known after apply)
+ plaintext_value = (sensitive value)
+ remote_updated_at = (known after apply)
+ repository = "kustomize-cluster"
+ repository_id = (known after apply)
[REDACTED: potentially sensitive plan output]
+ updated_at = (known after apply)
}
# github_repository.repositories["tfroot-twilio"] will be updated in-place
~ resource "github_repository" "repositories" {
id = "tfroot-twilio"
name = "tfroot-twilio"
~ topics = [
- "tfstate",
# (5 unchanged elements hidden)
]
# (36 unchanged attributes hidden)
# (1 unchanged block hidden)
}
# github_repository.repositories["www"] will be updated in-place
~ resource "github_repository" "repositories" {
id = "www"
name = "www"
~ topics = [
- "cloudflare",
# (5 unchanged elements hidden)
]
# (38 unchanged attributes hidden)
# (1 unchanged block hidden)
}
Plan: 1 to add, 2 to change, 0 to destroy.
OpenTofu will perform the following actions:
[REDACTED: potentially sensitive plan output]
[REDACTED: potentially sensitive plan output]
+ created_at = (known after apply)
+ id = (known after apply)
+ key_id = (known after apply)
+ plaintext_value = (sensitive value)
+ remote_updated_at = (known after apply)
+ repository = "kustomize-cluster"
+ repository_id = (known after apply)
[REDACTED: potentially sensitive plan output]
+ updated_at = (known after apply)
}
# github_repository.repositories["tfroot-twilio"] will be updated in-place
~ resource "github_repository" "repositories" {
id = "tfroot-twilio"
name = "tfroot-twilio"
~ topics = [
- "tfstate",
# (5 unchanged elements hidden)
]
# (36 unchanged attributes hidden)
# (1 unchanged block hidden)
}
# github_repository.repositories["www"] will be updated in-place
~ resource "github_repository" "repositories" {
id = "www"
name = "www"
~ topics = [
- "cloudflare",
# (5 unchanged elements hidden)
]
# (38 unchanged attributes hidden)
# (1 unchanged block hidden)
}
Plan: 1 to add, 2 to change, 0 to destroy. |
xnoto
added a commit
to makeitworkcloud/kustomize-cluster
that referenced
this pull request
Sep 4, 2026
## Summary Adds `.github/workflows/rotate-opencode-openai.yml`, a `workflow_dispatch` workflow that rotates the OpenAI OAuth grant in `workloads/opencode/opencode-openai-secret.yaml` end to end: 1. Runs `opencode auth login --provider openai --method "ChatGPT Pro/Plus (headless)"` (verified device flow on the deployed CLI 1.18.23) and surfaces the device URL and code in the run summary. 2. Regenerates the Secret manifest and encrypts with `sops --encrypt` under the repository creation rules — encryption-only, so CI holds no age key and no Actions secret beyond the App key below. 3. Bumps `auth-seed-revision` to `<date>-<run_number>` in the same change so the `seed-openai-auth` init container re-seeds the home PVC. 4. Commits to a rotation branch, opens a pull request, and enables auto-merge using a scoped `makeitworkbot` installation token (`actions/create-github-app-token`, mirroring the charts post-publish pattern), which branch protection on `main` allows to complete the merge once the required `test` check passes. Includes a branch-update fallback for the strict up-to-date requirement. ## Type of change - [x] CI / reusable workflow ## Validation - [x] Required pull-request checks pass — [`test` (pre-commit): success](https://github.com/makeitworkcloud/kustomize-cluster/actions/runs/33916941304/job/101166164341) - [x] Generated or centrally distributed files were regenerated by their owning automation, not hand-edited — no generated files touched Design evidence: CLI behavior probed on the deployed image version (device flow output, no localhost callback), install steps pinned to `opencode-ai@1.18.23` and sops `v3.13.3` with checksum verification, and the App-token merge pattern copied from the proven charts `update-opencode-gitops` job. First dispatch is the smoke test. ## Impact and rollout Prerequisite: makeitworkcloud/tfroot-github#58 distributing `CHART_UPDATER_GITHUB_APP_PRIVATE_KEY` to this repository must be applied before the first dispatch; until then the token step fails fast. The workflow is dispatch-only, serialized by a concurrency group, and never syncs Argo CD — generated rotation pull requests merge through the required `test` check, then the existing Argo CD + Reloader + init-container chain applies them. ## Safety and secrets - [x] Contains no plaintext secrets, decrypted SOPS values, state files, kubeconfigs, tokens, or private endpoints — the decrypted grant exists only in ephemeral runner memory, is never echoed or uploaded, and the generated commit is ciphertext plus the deliberately non-secret revision key. The device URL and one-time code appear in the run summary by design; they are short-lived and single-use - [x] No local OpenTofu init/plan/apply/destroy/import/state operations were run or claimed - [x] Breaking or irreversible effects are described above with rollback notes — rotation intentionally replaces the persisted grant; rollback restores prior ciphertext with a new revision value Agent disclosure: workflow, branch, and this pull request were prepared by the makeitwork OpenCode agent at the owner's direction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
kustomize-clusterto thechart_updater_github_app_private_keyrecipient list so the repository's newrotate-opencode-openaiworkflow (kustomize-cluster pull request #200) can mint scopedmakeitworkbotinstallation tokens.Branch protection on
kustomize-clustermainallows only the admins team and this App to complete pull-request merges (restrict_pushesingh-protections.tf), so the App token is required for that workflow's unattended auto-merge. The App installation is organization-wide, so no installation change accompanies this recipient addition.Type of change
Validation
opentofu / testandopentofu / planboth succeededlocal.secretsrecipient-list change; no generated files touchedImpact and rollout
Plan scope (from the plan check): 1 to add —
github_actions_secretforCHART_UPDATER_GITHUB_APP_PRIVATE_KEYonkustomize-cluster(sensitive value redacted in output), and 2 to change — pre-existing topic drift ongithub_repositorytfroot-twilio(removestfstate) andwww(removescloudflare), reconciling live topics to the declaredtopics_by_repositorymap; not caused by this change. 0 to destroy.After merge, the environment-gated apply distributes the secret. No change to App permissions, installation scope, or any other repository.
Safety and secrets
Agent disclosure: change, branch, and this pull request were prepared by the makeitwork OpenCode agent at the owner's direction, following the chart-updater runbook's add-a-source procedure.