hasura / gitkube

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

Deploy Helm Apps #27

Open marcellodesales opened 6 years ago

marcellodesales commented 6 years ago

Requirement

Design

0x777 commented 6 years ago

Currently, gitkube simplifies this workflow

docker build -t ...
docker push ...
kubectl set-image ... 

with

git push remote master

What is your current workflow with a kubeapps application and how do you like to see it automated?

marcellodesales commented 6 years ago

@0x777 So, kubeapps offers a way to deploy a Helm Application from a given Helm Chart Registry. Given that and your workflow, what I was thinking is that we could do the following:

git push remote branch

Still should guarantee what gitkube does already, but for Helm Apps, as follows:

  1. Identify if there's a Helm Spec
  2. Compute the actual URL of the application based on the Cluster Config + External DNS name
    • Through external dns, we get the endpoint for the cluster Cluster DNS cluster.name.com
    • With the helm settings ingress.host, we can compute the URL myapp.cluster.name.com
  3. Push the committed application to the associated Helm Chart Registry under the SHA version associated with the commit
    • Pushes to the registry with a known URL for installation
    • Add extra metadata for the branch, tag, etc
    • Final url for the app could be either myapp.cluster.name.com, for master branch, or SHA.myapp.cluster.name.com for the SHA, develop.myapp.cluster.name.com for the develop branch, etc.
    • The mapping for a gitflow mechanism should be provided in a metadata file like gitkube.yml
  4. Execute the helm install with the URL for installation above