Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions kubernetes/operationcode_backend/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,52 @@ spec:
secretKeyRef:
name: backend-secrets
key: airtable_api_key
- name: SLACK_LEGACY_ADMIN_TOKEN
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR says adding POSTGRES_USER, where'd this come from?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially it was just going to be this. But these variables ended up being required to get the slack invites working. These environment variables were initially stored in a way that made it not obvious they were used. When we deactivated them we forgot they were still in use.

valueFrom:
secretKeyRef:
name: backend-secrets
key: slack_legacy_admin_token
- name: AIRTABLE_BASE_ID
valueFrom:
secretKeyRef:
name: backend-secrets
key: airtable_base_id
optional: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this optional: true doing here? It's not mentioned in the PR. Also for each following reference.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We aren't using airtable in staging, Without this environment variable set in the config file kubernetes gets mad.

Currently airtable is used as a spreadsheet database for mentor requests.

- name: GIT_HUB_CLIENT_ID
valueFrom:
secretKeyRef:
name: backend-secrets
key: git_hub_client_id
optional: true
- name: GIT_HUB_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: backend-secrets
key: git_hub_client_secret
optional: true
- name: GIT_HUB_OAUTH_TOKEN
valueFrom:
secretKeyRef:
name: backend-secrets
key: git_hub_oauth_token
optional: true
- name: PY_BOT_AUTH_KEY
valueFrom:
secretKeyRef:
name: backend-secrets
key: py_bot_auth_key
optional: true
- name: POSTGRES_HOST
value: opcode-postgres
- name: REDIS_URL
value: redis://opcode-redis:6379/0
- name: RAILS_ENV
value: production
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: backend-secrets
key: postgres_user
- name: SLACK_SUBDOMAIN
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -96,6 +111,11 @@ spec:
secretKeyRef:
name: backend-secrets
key: postgres_password
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: backend-secrets
key: postgres_user
- name: POSTGRES_HOST
value: opcode-postgres
- name: REDIS_URL
Expand All @@ -105,6 +125,11 @@ spec:
secretKeyRef:
name: backend-secrets
key: slack_subdomain
- name: SLACK_LEGACY_ADMIN_TOKEN
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR says adding POSTGRES_USER, where'd this come from?

valueFrom:
secretKeyRef:
name: backend-secrets
key: slack_legacy_admin_token
- name: SLACK_TOKEN
valueFrom:
secretKeyRef:
Expand Down
3 changes: 3 additions & 0 deletions kubernetes/operationcode_backend/secrets/secret.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ metadata:
type: Opaque
data:
airtable_add_user_base_id: SECRET
airtable_base_id: SECRET
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR says adding POSTGRES_USER, where'd this come from?

airtable_add_user_table_name: SECRET
airtable_api_key: SECRET
jwt_secret_key: SECRET
postgres_password: SECRET
postgres_user: SECRET
secret_key_base: SECRET
slack_legacy_admin_token: SECRET
sendgrid_password: SECRET
sendgrid_username: SECRET
sendgrid_api_key: SECRET
Expand Down