jenkins-x / enhancements

Repository containing design proposals for Jenkins X enhancements
12 stars 16 forks source link

Preview with Helmfile #38

Closed vbehar closed 3 years ago

vbehar commented 4 years ago

See #26

TL;DR

vbehar commented 4 years ago

FYI we've been deploying our preview envs at Dailymotion using Helmfile (and Helm 3) for a few months now, and... it's so much better ;-)

nimajalali commented 4 years ago

@vbehar Is the helmfile feature something that's available using off the shelf jx or are you running a fork internally?

nimajalali commented 4 years ago

I see now that jx v3 uses helmfile.

jstrachan commented 4 years ago

@vbehar i wonder how do you GC your preview environments with helmfile? Do you assume all resources are in the same namespace and remove that?

Just wondered. If we moved to helmfile for previews it would be awesome if folks could create a Canary in the staging namespace- which should be easy via a helmfile - am just not sure how removal of previews would work

vbehar commented 4 years ago

@jstrachan good question. we have our own GC, which is based on the std one. It does the following

it works in our case because we're using helmfile with helm3, and 1 namespace per preview env. we need to delete each helm release because some projects rely on helm hooks (pre-install and post-delete) to create/delete cloud resources (gcs buckets, pubsub topics, ...)

ideally we should use the helmfile destroy command, but it requires to have access to the PR's source code.

jstrachan commented 4 years ago

here's the first spike of helmfile based previews... https://github.com/jenkins-x/jx-preview/blob/master/README.md

we're using a Preview custom resource to keep track of the source code (and user/token to clone it) so we can do a real helmfile destroy when we destroy or garbage collect a preview.

Its working great + is fully integrated into Jenkins X 3.x now and the BDD tests are green

would love to support Terraform based previews as well so we could spin up a custom cluster / cloud infrastructure used by the preview - then tear it all down afterwards

vbehar commented 4 years ago

that's awesome! Mainly the fact that you use helmfile destroy, so it's a clean deletion

jenkins-x-bot commented 3 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://jenkins-x.io/community. /lifecycle stale

jenkins-x-bot commented 3 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close. Provide feedback via https://jenkins-x.io/community. /lifecycle rotten

jenkins-x-bot commented 3 years ago

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten. Provide feedback via https://jenkins-x.io/community. /close

jenkins-x-bot commented 3 years ago

@jenkins-x-bot: Closing this issue.

In response to [this](https://github.com/jenkins-x/enhancements/issues/38#issuecomment-775212732): >Rotten issues close after 30d of inactivity. >Reopen the issue with `/reopen`. >Mark the issue as fresh with `/remove-lifecycle rotten`. >Provide feedback via https://jenkins-x.io/community. >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [jenkins-x/lighthouse](https://github.com/jenkins-x/lighthouse/issues/new?title=Command%20issue:) repository.