Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Secrets 🔒
The
lagoon-env
configmap generation has been converted into Go templates while also changing to secrets to address #392Actually deleting variables?!
This also fixes the long running #136 bug by converting the old
lagoon-env
configmap into two secrets and working out what should and shouldn't exist in each.lagoon-env
- will contain only variables that are in the Lagoon API.lagoon-env
configmap you're all familiar with, except now it is a secret, and now it only contains what is in the Lagoon API withglobal
andruntime
scoped variables.lagoon-platform-env
- will contain anything that was previously in the configmap, but isn't in the Lagoon API.This allows an environment to retain its current variables without removing any that could result in a change in the operation of the environment. If a user does end up adding a variable that is in the
lagoon-platform-env
secret, it will be removed from that secret, and added to the mainlagoon-env
secret. This way, if a user ends up removing that variable from the API, the cleanup process will now delete it so it won't exist in either secret.The order that the secrets are added to the deployments is that
lagoon-platform-env
is first, thenlagoon-env
.This means that variables in
lagoon-env
should always win over any variables in thelagoon-platform-env
secret (based on ordering discussions in uselagoon/lagoon#2348), this is why the behaviour of removing from thelagoon-platform-env
secret if a matching variable is found in the Lagoon API is done. Lagoon API wins.Minor changes
Closing issues
closes #392
closes #136