Proposal: an extensible approach to Auto DevOps deploy stage
Problem
We have been using a forked version of Jobs/Deploy.gitlab-ci.yml
as well a fork of the built-in auto-deploy-image
Helm chart to help facilitate our customer's application deployments. There are many things we like about this approach like how it interacts with other Auto DevOps stages and applies certain conventions necessary for other GitLab functionality to work (like Deploy Boards).
That being said, I think anyone who has used auto-deploy-image
is aware of the limitations it imposes. We find ourselves having to make changes to our forked Helm chart much more often than we'd like in order to support various customer use cases as well as our own increasingly complex Kubernetes deployments.
After rewriting many of the existing GitLab "managed apps" using kustomize
and a very good experience rolling that out to production, we started to think kustomize
might be a good fit for the Auto Deploy stage as well.
Proposal
We have a proof-of-concept rewrite of auto-deploy-image
(including ports for many of the same tests, all passing) available at https://appdat.jsc.nasa.gov/ci/auto-deploy. This implementation is based on kustomize
instead of Helm and thus provides a lot more flexibility for individual project deployments.
It works by applying the base
kustomization on top of the user-specified resources (or variants/webapp
by default). The included variants/webapp
is intended to support the same "out of the box" style deployment that the existing Helm chart provides.
Please see the README for additional description of the problems we are trying to solve.
I would also like to point you at the some of the test cases that I think help explain how compelling this approach can be:
-
test-download-remote
: demonstrates that a remote package can be pulled in from any git repo -
test-download-local
: demonstrates that a package can be referenced from a local directory even if it only contains vanilla k8s resource files (i.e. nokustomization.yaml
) -
test-deploy
: deployspodinfo
straight from GitHub source without us having any prior knowledge of what was there
/cc @tkuah @hfyngvason @ash2k