billimek / k8s-gitops

GitOps principles to define kubernetes cluster state via code
Apache License 2.0
664 stars 87 forks source link

migrate to fluxv2 #160

Closed billimek closed 3 years ago

billimek commented 4 years ago

See https://toolkit.fluxcd.io/guides/flux-v1-migration/

billimek commented 3 years ago

Steps suggested by @bjw-s:

onedr0p commented 3 years ago

Step 6: migrate to new notifications for flux2 :)

Works great with Discord!

image

bjw-s commented 3 years ago

Steps suggested by @bjw-s:

  • [ ] scale down flux v1 and memcached deployment to 0
  • [ ] scale down helm-operator deployment to 0
  • [ ] run flux bootstrap in the repo root folder
  • [ ] slowly start migrating existing HelmReleases to the new structure(s)
  • [ ] helm uninstall flux

This pretty much sums up my steps. The "migrating" step consisted of k uninstall <old helmrelease.yaml> (this will keep all the resources intact because Flux v1 is scaled down), and then applying/pushing the new HelmRelease manifest. The only thing you need to be careful about is that you have the same release name in v1 as in v2, so that the new HelmRelease will manage the existing resources.

billimek commented 3 years ago

Checklist for HelmRelease migrations: