lookit / lookit-orchestrator

Continuous Integration and Continuous Delivery for Lookit.
0 stars 2 forks source link

Add S3 env vars to patch and secrets files #41

Closed becky-gilbert closed 1 year ago

becky-gilbert commented 1 year ago

This is another attempt at adding the AWS S3 secrets to the staging (and production) environments for testing - issue #36.

This is similar this previous attempt, PR #31, which resulted in an error on production. After merging #31, we saw several production pods with the status CreateContainerConfigError and warning messages from kubelet:

I think these errors occurred because we had variables listed in the patch files that were missing from the production env files.

There are two differences with this PR which will hopefully prevent the production errors from happening again:

  1. Added optional: true to the new variables in the patches
  2. Added the new S3 variables to the production secrets file, not just the staging secrets file

Unfortunately we're now modifying the production env, which is something I was hoping to avoid, but I don't think there's a way around this. I think we've minimized the risk of production errors because we're only adding new vars (none of which are actually used in the production code), and we aren't modifying or removing any existing environment variables.

becky-gilbert commented 1 year ago

Note: merging this PR broke the staging build that followed of spaces in the environment variable definitions in this PR. So I reverted the merge commit for this PR (918ad4d315ac353b212b90c52112977ccad138a2) and then merged a new one that is the same but without the spaces (#42).