-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing existing k8s resources into a release #1281
Comments
@dudicoco Hey! Sorry but I don't get it. For example, how would you expect your helmfile.yaml to look like when importing existing k8s resources? That may help me understanding what you are trying to. Anyway, I was thinking that you would just manually modify your existing resources with |
Hey @mumoshu, thanks for the reply! The
Obviously I could patch the resources manually, but I would like the process to be automated with infrastructure as code. |
@dudicoco Thanks! I believe you need another mechanism than jsonPatches for that. I do understand your use-case though. If I were you, I would probably enhance eksctl OR terraform-provider-eksctl OR helmfile to enable you to patch live resources. But implementing that in Helmfile seems to bloat Helmfile's scope? 🤔 WDYT? |
Please let met me dive into my memory... anyway, I might have possibly missed porting that feature in #1172 so it may not work now |
#746 was intended to work by importing existing resources before the first Would that work for you if it worked as advertised? |
I thought it was used like this:
|
@mumoshu i'm getting the following error: Perhaps using the helm-x binary is needed for this feature to work? Regarding patching via terraform, this is not possible at the moment: |
Yes, I believe you're correct. But on the other hand I thought Otherwise letting Helmfile to leverage helm 3's ability to adopt resources would be nice as well. |
Thanks @mumoshu. In the meantime, I have found a workaround using
This is working as expected, however I have a problem - as part of our CI we are running |
Would love to follow up on this. I'd like to see a way to modify resources like the EKS installed |
@abatilo i've ended up importing the resources with a script on all of our existing clusters (just annotate and add labels to the resources). |
I’m a bit confused as this seems to automagically work for me already. I migrated the storage for some of my releases (and will soon write a blog post about that, can link it here if anybody is interested). During that, I deleted the PVC resource and later recreated it (for the new PV where the data was migrated to) without the labels helm uses to denote ownership ( After that, I had a PVC with the same name as the old one, but without the labels/annotations for helm. I then executed To then rectify the missing labels, I ran I have a gut feeling that this has to do with helm/helm#7649, but if somebody can clarify why that worked for me, I’d be really happy! I’m running:
|
I would like to import existing resources into my release.
This new
helm
feature allows you to adopt existing resources by annotating them: helm/helm#7649I was thinking of implementing this using the new
Kustomize
feature #1172 but I couldn't get it to work.Is it possible to use this feature just for patching existing k8s resources? If not, is there a different way to achieve this?
Thanks
The text was updated successfully, but these errors were encountered: