Skip to content

Commit 3895a75

Browse files
committed
Updates for deployment
1 parent 25d058f commit 3895a75

File tree

6 files changed

+42
-0
lines changed

6 files changed

+42
-0
lines changed

.controlplane/controlplane.yml

+5
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,14 @@ apps:
6060
<<: *common
6161
# Order matters!
6262
setup_app_templates:
63+
# GVC template contains the identity
6364
- gvc
65+
66+
# Resources
6467
- postgres
6568
- redis
69+
70+
# Workloads, like Dynos types on Heroku
6671
- daily-task
6772
- rails
6873
# Prefix is used to identify these "qa" apps.

.controlplane/templates/daily-task.yml

+2
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ spec:
3030
external:
3131
outboundAllowCIDR:
3232
- 0.0.0.0/0
33+
# Identity is used for binding workload to secrets
34+
identityLink: {{APP_IDENTITY_LINK}}

.controlplane/templates/gvc.yml

+6
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ spec:
2323
staticPlacement:
2424
locationLinks:
2525
- {{APP_LOCATION_LINK}}
26+
27+
---
28+
29+
# Identity is needed to access secrets
30+
kind: identity
31+
name: {{APP_IDENTITY}}

.controlplane/templates/rails.yml

+2
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ spec:
3434
# Could configure outbound for more security
3535
outboundAllowCIDR:
3636
- 0.0.0.0/0
37+
# Identity is used for binding workload to secrets
38+
identityLink: {{APP_IDENTITY_LINK}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Policy is needed to allow identities to access secrets
2+
kind: policy
3+
name: {{APP_SECRETS_POLICY}}
4+
targetKind: secret

.controlplane/templates/secrets.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Org level secrets are used to store sensitive information that is
2+
# shared across multiple apps in the same organization. This is
3+
# useful for storing things like API keys, database credentials, and
4+
# other sensitive information that is shared across multiple apps
5+
# in the same organization.
6+
7+
# This is how you apply this once (not during CI)
8+
# cpl apply-template secrets -a qa-react-webpack-rails-tutorial --org shakacode-open-source-examples-staging
9+
10+
kind: secret
11+
name: {{APP_SECRETS}}
12+
type: dictionary
13+
data:
14+
SOME_ENV: "123456"
15+
16+
---
17+
18+
# Policy is needed to allow identities to access secrets
19+
kind: policy
20+
name: {{APP_SECRETS_POLICY}}
21+
targetKind: secret
22+
targetLinks:
23+
- //secret/{{APP_SECRETS}}

0 commit comments

Comments
 (0)