Auto Deploy should use project's helm chart, if available
Description
It's awesome that Auto Deploy deploys a Docker image automatically for a project, but the configuration of services and ingress is hard-coded. We should let developers customize how their apps are deployed, yet still take advantage of the rest Auto Deploy has to offer.
Pecking order:
-
If project has Helm chart (
./chart/Chart.yaml
) or has variable pointing to a chart (AUTO_DEPLOY_CHART
), use it -
If project has
docker-compose-bundle.dab
, use it to derive k8s config (using Kompose?) (https://gitlab.com/gitlab-org/gitlab-ce/issues/37588) -
If project has
docker-compose.yml
, use it to derive k8s config (using Kompose?) (https://gitlab.com/gitlab-org/gitlab-ce/issues/37588) -
If project has
Dockerfile
, use it, with default k8s config (ideal from Helm chart, but currently from parametrized YML) - If nothing, use Herokuish buildpacks to create Docker image, and default k8s config to deploy
Going further, ideally Auto Deploy would add a default helm chart to your project's repo for you, so you have a place to start for edits and incremental learning.
Proposal
Links / references
- May build on https://gitlab.com/gitlab-org/gitlab-ce/issues/30723 option 2.
- Auto deploy supports docker compose files via Kompose: https://gitlab.com/gitlab-org/gitlab-ce/issues/29003
Documentation blurb
Auto Deploy deploys a Docker image automatically for a project, including automatic configuration of a good CI/CD pipeline. But the configuration of services and ingress is hard-coded and if you want something custom, you have to give up the rest of the benefits of Auto Deploy.
GitLab 9.4 adds support for leveraging Helm Charts when using Auto Deploy. Simply create a project-level variable CI_AUTO_DEPLOY_CHART
to point to a Helm chart, this will now be used for deployment rather than the built-in chart. The value can be a reference to a stable chart, a full URL for another chart, or even a filesystem path to a chart embedded in your project repo.