Open rocketeerbkw opened 2 years ago
Agree - the API should send a build to the remote-controller with a fully resolved set of variables. The controller should be able to provide default/override variables that are applied as-needed to these resolved vars.
The controller should be able to provide default/override variables that are applied as-needed to these resolved vars.
I left that for a separate issue since I couldn't remember the specifics that we agreed on, figured this would need to be done either way.
When a deployment of an environment is scheduled, the
api
sends along all the environment variables that have been configured at the project and environment level, then it's up tokubectl-build-deploy-dind
to determine which variables are "final" and what scope they have. Since this needs to happen multiple times, it leads to a lot of copy/paste of the logic, makes it difficult to override at the build-pod/cluster level, and doesn't give any insight to users what environment variables may have been overridden.We should move all this logic to the
api
and send the final, cascaded list, split by scope. This would allow, for example, the UI to show all configured variables and their overrides to end users. It also removes a bunch of business logic out of the builder.