Skip to content

Commit

Permalink
Updates for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
justin808 committed Mar 24, 2024
1 parent 25d058f commit 3895a75
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .controlplane/controlplane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,14 @@ apps:
<<: *common
# Order matters!
setup_app_templates:
# GVC template contains the identity
- gvc

# Resources
- postgres
- redis

# Workloads, like Dynos types on Heroku
- daily-task
- rails
# Prefix is used to identify these "qa" apps.
Expand Down
2 changes: 2 additions & 0 deletions .controlplane/templates/daily-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ spec:
external:
outboundAllowCIDR:
- 0.0.0.0/0
# Identity is used for binding workload to secrets
identityLink: {{APP_IDENTITY_LINK}}
6 changes: 6 additions & 0 deletions .controlplane/templates/gvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ spec:
staticPlacement:
locationLinks:
- {{APP_LOCATION_LINK}}

---

# Identity is needed to access secrets
kind: identity
name: {{APP_IDENTITY}}
2 changes: 2 additions & 0 deletions .controlplane/templates/rails.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ spec:
# Could configure outbound for more security
outboundAllowCIDR:
- 0.0.0.0/0
# Identity is used for binding workload to secrets
identityLink: {{APP_IDENTITY_LINK}}
4 changes: 4 additions & 0 deletions .controlplane/templates/secrets-policy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Policy is needed to allow identities to access secrets
kind: policy
name: {{APP_SECRETS_POLICY}}
targetKind: secret
23 changes: 23 additions & 0 deletions .controlplane/templates/secrets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Org level secrets are used to store sensitive information that is
# shared across multiple apps in the same organization. This is
# useful for storing things like API keys, database credentials, and
# other sensitive information that is shared across multiple apps
# in the same organization.

# This is how you apply this once (not during CI)
# cpl apply-template secrets -a qa-react-webpack-rails-tutorial --org shakacode-open-source-examples-staging

kind: secret
name: {{APP_SECRETS}}
type: dictionary
data:
SOME_ENV: "123456"

---

# Policy is needed to allow identities to access secrets
kind: policy
name: {{APP_SECRETS_POLICY}}
targetKind: secret
targetLinks:
- //secret/{{APP_SECRETS}}

0 comments on commit 3895a75

Please sign in to comment.