wkrzywiec / k8s-helm-helmfile

Project which compares 3 approaches to deploy apps on Kubernetes cluster (using kubectl, helm & helmfile)
88 stars 83 forks source link

Requesting dry-run feature #4

Open bharangit opened 3 years ago

bharangit commented 3 years ago

Hi,

Not sure if it is right way to create this request for a feature as an issue. I am using helmfile for deploying a complex chain of charts, it is riskier to run helmfile -i apply in interactive mode every time and to say no to command. could you pls provide dry-run feature to allow us to see what is the resultant yaml if that deployment goes in..

wkrzywiec commented 3 years ago

Hi,

Yeah, raising an issue is a good way for either discussion, clarification or a new feature 😉

Don't know if I got your question, so let me rephrase it. You would like to have a feature of helm/helmfile to print all the Kubernetes objects that will be generated and than used for installation?

bharangit commented 3 years ago

Hi,

Thanks for your reply.

In our project we are using helmfile -i apply to compare against previous and current changes and then cancelling it to the question y/n at the end. It is bit risky as someone might enter y and it might applied. Instead if there is a feature like helmfile -i dry-run without having to apply changes to get changes / mutations in current version, that would be of great help.

Understanding Helm dry run for template debugging | Jhooqhttps://jhooq.com/helm-dry-run-install/

If there is such a dry-run feature already in helmfile, then pls educate me 🙂

Thank you, bharanidharan


From: Wojtek Krzywiec @.> Sent: 26 March 2021 16:16 To: wkrzywiec/k8s-helm-helmfile @.> Cc: bharangit @.>; Author @.> Subject: Re: [wkrzywiec/k8s-helm-helmfile] Requesting dry-run feature (#4)

Hi,

Yeah, raising an issue is a good way for either discussion, clarification or a new feature 😉

Don't know if I got your question, so let me rephrase it. You would like to have a feature of helm/helmfile to print all the Kubernetes objects that will be generated and than used for installation?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/wkrzywiec/k8s-helm-helmfile/issues/4#issuecomment-808113851, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APAJILLZT3JXM57PCPR3VODTFRQYRANCNFSM4Z27ON7A.

wkrzywiec commented 3 years ago

Honestly speaking I've never tried to find such command in helmfile. By looking over the Internet I found this issue - https://github.com/roboll/helmfile/issues/118 which probably is what you're looking for.

I could try to play around with it to find it, but possibly on a weekend on at the beginning of the next week.

bharangit commented 3 years ago

Thanks for considering. I was referring to this feature of Helm (helm install --dry-run --debug).

as explained in this blog : https://jhooq.com/helm-dry-run-install/

No urgency by the way, Please take your time. [https://jhooq.com/wp-content/uploads/2020/07/helm.webp]https://jhooq.com/helm-dry-run-install/ Understanding Helm dry run for template debugging | Jhooqhttps://jhooq.com/helm-dry-run-install/ Debugging and troubleshooting Helm Template in the complex production environment can be really daunting if you do not use helm install --dry-run --debug or helm template command for debugging the Helm Templates.. helm install --dry-run --debug:- It will validate and verify your chart by connecting to kubernetes api server and after successful validation it will render the manifest in the form ... jhooq.com


From: Wojtek Krzywiec @.> Sent: 27 March 2021 01:59 To: wkrzywiec/k8s-helm-helmfile @.> Cc: bharangit @.>; Author @.> Subject: Re: [wkrzywiec/k8s-helm-helmfile] Requesting dry-run feature (#4)

Honestly speaking I've never tried to find such command in helmfile. By looking over the Internet I found this issue - roboll/helmfile#118https://github.com/roboll/helmfile/issues/118 which probably is what you're looking for.

I could try to play around with it to find it, but possibly on a weekend on at the beginning of the next week.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/wkrzywiec/k8s-helm-helmfile/issues/4#issuecomment-808491386, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APAJILLMGFZ33YC33IADTT3TFTVC5ANCNFSM4Z27ON7A.

cglacet commented 3 years ago

I don't get it, isn't the template command doing just that?

bharangit commented 3 years ago

sorry for not being clear..

$ helmfile template (gives me this as follows, as in first screenshot):

[cid:05d4c74b-8969-4878-999f-9af40a5123f4]

helmfile -f helmfile.yaml -i apply (-i flag compares the existing deployment and the new values to give me the following highlighting the changes in green and with a + sign on the left ).

I do this $helmfile -f filename.yaml -i apply (followed by 'n' to apply changes y/n) often to check changes everytime i make some changes to verify before deploying from azure pipeline.

I wish having a new feature / flag which can compare existing and new changes without having to pass "apply" parameter as it is riskier if someone accidentally answers 'y' to the question after the run.

so if we have something like $helmfile -f filename.yaml -i notapply , this will derisk our developers from accidentally deploying from command line and still gives us ability to see changes / additions/ removal of deployment in kubernetes.

I hope it makes sense now. 🙂

[cid:48ef18f3-e24a-4796-8f86-f6a0a845a95f]


From: Christian glacet @.> Sent: 27 March 2021 21:24 To: wkrzywiec/k8s-helm-helmfile @.> Cc: bharangit @.>; Author @.> Subject: Re: [wkrzywiec/k8s-helm-helmfile] Requesting dry-run feature (#4)

I don't get it, isn't the template command doing just that?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/wkrzywiec/k8s-helm-helmfile/issues/4#issuecomment-808752960, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APAJILPI5O2HOD5H62IF6F3TFX5TLANCNFSM4Z27ON7A.

wkrzywiec commented 3 years ago

Hi sorry for going back so late.

I'm not able to see your screenshots, but do you think one of these will do the trick?:

bharangit commented 3 years ago

Thanks, will try and get back.

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Wojtek Krzywiec @.> Sent: Tuesday, April 13, 2021 5:58:08 PM To: wkrzywiec/k8s-helm-helmfile @.> Cc: bharangit @.>; Author @.> Subject: Re: [wkrzywiec/k8s-helm-helmfile] Requesting dry-run feature (#4)

Hi sorry for going back so late.

I'm not able to see your screenshots, but do you think one of these will do the trick?:

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/wkrzywiec/k8s-helm-helmfile/issues/4#issuecomment-818849620, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APAJILOD2O26K37NQCTDMWLTIRSZBANCNFSM4Z27ON7A.

bharangit commented 3 years ago

Hi,

Thanks for the template and dry-run, it is helpful.

One issue using "helmfile -f filename -i apply" in windows based machine, is that it is showing entire chart as mutations not showing exact differences. I have attached image showing an example. As you see there, even though there are no changes in this chart, if i do helm diff it is showing entire chart as changed. I am running in wsl2 in windows 10.

Is it any setting in vs code or any option in helm diff to overcome this?

Thanks, Bharani


From: Wojtek Krzywiec @.> Sent: 13 April 2021 21:28 To: wkrzywiec/k8s-helm-helmfile @.> Cc: bharangit @.>; Author @.> Subject: Re: [wkrzywiec/k8s-helm-helmfile] Requesting dry-run feature (#4)

Hi sorry for going back so late.

I'm not able to see your screenshots, but do you think one of these will do the trick?:

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/wkrzywiec/k8s-helm-helmfile/issues/4#issuecomment-818849620, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APAJILOD2O26K37NQCTDMWLTIRSZBANCNFSM4Z27ON7A.

wkrzywiec commented 3 years ago

Hi,

sorry for coming back so late.

Unfortunately I do not see your picture, so it's hard for me to get to the problem. But nevertheless, I think I'm not the good person to help with that, not because I'm not using it on Windows, but actually I'm not using Helm so heavily. I would suggest to ask either more experienced people or even raise an issue in the official GitHub repo of this project ;)

h0jeZvgoxFepBQ2C commented 1 year ago

Any updates on this?