Automatically forward feature flag configuration through to Auto DevOps deployed applications
Problem to solve
Using Auto DevOps with feature flags requires manual setup for the environment name and token to be available in your deployment.
Thanks to @jmadkins we may have a path forward for the environment name at gitlab-org/cluster-integration/auto-deploy-image!21 (merged) but for the token we'll want to consider a more secure option.
Intended users
Further details
Proposal
The following environment variables should automatically be available in any Auto DevOps deployment:
$GITLAB_ENVIRONMENT_NAME
$GITLAB_FEATURE_FLAGS_TOKEN
Specifics extracted from gitlab-org/cluster-integration/auto-deploy-image!21 (comment 200912223)
- Update GitLab to always pass the feature flags token to CI jobs (probably somewhere in this part of the code https://gitlab.com/gitlab-org/gitlab-ce/blob/ee028785a3e4cebf08cc0a9a2ae969c9f67d675a/app/models/project.rb#L1779)
- Update the deploy script to actually create a secret from this CI variable (like we do others in https://gitlab.com/gitlab-org/cluster-integration/auto-deploy-image/blob/master/src/bin/auto-deploy#L267 ). This could either be merged with the other secrets which will then mean no changes to mount this secret into the pod or if we wanted to put it into a separate secret it could be in the chart https://gitlab.com/gitlab-org/charts/auto-deploy-app/blob/04485640f9313f09eaf509d5d3b517106331fe34/templates/deployment.yaml#L44
Permissions and Security
Documentation
Testing
What does success look like, and how can we measure that?
Links / references
Edited by Dylan Griffith