Skip to content

Environment variables added for slack invites and staging. #59

Merged
ohaiwalt merged 6 commits intomasterfrom
postgres_env_changes
Apr 19, 2019
Merged

Environment variables added for slack invites and staging. #59
ohaiwalt merged 6 commits intomasterfrom
postgres_env_changes

Conversation

@apex-omontgomery
Copy link
Member

@apex-omontgomery apex-omontgomery commented Nov 10, 2018

OperationCode/operationcode_backend#458

Already have POSTGRES_PASSWORD, adding POSTGRES_USER to the deployment file.

This PR was work on the environment variables that affected 2 systems:

  1. Allow optional prod only environment variables to fix staging systems
  2. Set a slack token with a value we knew indicated it was an admin scope and not a normal application scope.

These changes were related to getting the slack invites working, by moving the credentials into the kubernetes and by specifying which environment variables are optional for kubernetes in staging. Without these values in staging, kubernetes ran into errors where it'd look for them.

https://github.com/OperationCode/operationcode_backend/pull/447/files

These changes have been pushed to prod kubenernetes since Nov 9th in order to unblock @kylemh

Copy link
Member

@ohaiwalt ohaiwalt left a comment

Choose a reason for hiding this comment

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

Looked at the issue resolved as well as PR description, lots of unmentioned items in here. Are those intended to be included here?

If so, please update w/descriptions and references.

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.

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.

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?

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?

@apex-omontgomery apex-omontgomery changed the title add POSTGRES_USER Environment variables added for slack invites and staging. Dec 20, 2018
@ohaiwalt ohaiwalt merged commit 166fc94 into master Apr 19, 2019
@kylemh kylemh deleted the postgres_env_changes branch April 19, 2019 02:18
@kylemh kylemh restored the postgres_env_changes branch April 19, 2019 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants