Closed becky-gilbert closed 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).
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:Error: couldn't find key AWS_RECORDING_REGION in Secret default/production-lookit-secrets-26ctdht59h
MountVolume.SetUp failed for volume "secret-volume" : secret "production-lookit-secrets-26ctdht59h" not found
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:
optional: true
to the new variables in the patchesUnfortunately 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.