Skip to content

Commit 0f2bcd4

Browse files
ihabadhamclaude
andcommitted
Use {{APP_SECRETS}} for renderer + license secret references
{{APP_NAME}}-secrets expanded to a per-app secret name, which would require a new Control Plane Secret for every review app PR — wrong per cpflow's own conventions. cpflow exposes {{APP_SECRETS}} (lib/core/template_parser.rb:49, lib/core/config.rb:51-52) which expands to `{APP_PREFIX}-secrets`. Per our controlplane.yml, APP_PREFIX is: - `react-webpack-rails-tutorial-production` for the prod app - `react-webpack-rails-tutorial-staging` for the staging app - `qa-react-webpack-rails-tutorial` for all qa-* review apps (because match_if_app_name_starts_with: true) So review apps all share `qa-react-webpack-rails-tutorial-secrets` instead of each PR needing its own. Three secrets total across two orgs instead of one per PR. Matches the `{APP_PREFIX}-secrets` default documented at shakacode/control-plane-flow/docs/secrets-and-env-values.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 35faa50 commit 0f2bcd4

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.controlplane/templates/app.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ spec:
3434
value: '2'
3535
- name: RENDERER_URL
3636
value: http://localhost:3800
37-
# RENDERER_PASSWORD and REACT_ON_RAILS_PRO_LICENSE must be created as a
38-
# Control Plane Secret named `<app>-secrets` in each org before deploy.
37+
# RENDERER_PASSWORD and REACT_ON_RAILS_PRO_LICENSE must be created in the
38+
# Control Plane Secret named by {{APP_SECRETS}} before deploy. cpflow
39+
# resolves {{APP_SECRETS}} to `{APP_PREFIX}-secrets` — which means review
40+
# apps all share one `qa-react-webpack-rails-tutorial-secrets` (thanks to
41+
# match_if_app_name_starts_with: true on the qa template).
3942
- name: RENDERER_PASSWORD
40-
value: cpln://secret/{{APP_NAME}}-secrets.RENDERER_PASSWORD
43+
value: cpln://secret/{{APP_SECRETS}}.RENDERER_PASSWORD
4144
- name: REACT_ON_RAILS_PRO_LICENSE
42-
value: cpln://secret/{{APP_NAME}}-secrets.REACT_ON_RAILS_PRO_LICENSE
45+
value: cpln://secret/{{APP_SECRETS}}.REACT_ON_RAILS_PRO_LICENSE
4346
# Part of standard configuration
4447
staticPlacement:
4548
locationLinks:

0 commit comments

Comments
 (0)