hasura / gitkube

Build and deploy docker images to Kubernetes using git push
Apache License 2.0
3.81k stars 207 forks source link

Build docker image with ENV from Kube #105

Closed duyleekun closed 5 years ago

duyleekun commented 5 years ago

There's a shared ENV between build and running phase. Currently, I have to duplicate the ENV from kube manifest into Dockerfile. Is there any way to do that properly yet?

tirumaraiselvan commented 5 years ago

Although this would have been an improvement in the UX but unfortunately not technically possible.

The ENV used during build must be loaded into gitkubed pod because that is the one that builds the image. So you will need to copy it either way (in the gitkubed manifest or the remote manifest). It is better UX to have the ENV in the remote manifest rather than in a global gitkubed manifest.

duyleekun commented 5 years ago

Does current Remote object support ref to ConfigMap/Secret because I can't find it in the documents. Having ConfigMap/Secret ref-able from Remote would solve my use case.

tirumaraiselvan commented 5 years ago

That's a great suggestion. Can you please open an issue for the same?