I have tried getting this to work with zero success.
With this helm file:
repositories:
- name: stable
url: https://kubernetes-charts.storage.googleapis.com
releases:
- name: test-site
chart: stable/wordpress
version: 1.0.0
set:
- name: mariadb.persistence.enabled
value: false
- name: ingress.enabled
value: true
- name: ingress.hostname
value: test.example.com
- name: ingress.annotations.kubernetes\.io/ingress\.class
value: nginx
- name: persistence.enabled
value: false
I get this output.
09:36 $ helmfile --file ./HelmfileTest.yaml diff upgrade
exec: helm diff test-site stable/wordpress --version 1.0.0 --set mariadb.persistence.enabled=false,ingress.enabled=true,ingress.hostname=test.example.com,ingress.annotations.kubernetes\.io/ingress\.class=nginx,persistence.enabled=false
Command "helm diff" is deprecated, use "helm diff upgrade" instead
Error: chart "wordpress" matching 1.0.0 not found in stable index. (try 'helm repo update'). No chart version found for wordpress-1.0.0
Usage:
diff [flags]
diff [command]
Available Commands:
revision Shows diff between revision's manifests
rollback Show a diff explaining what a helm rollback could perform
upgrade Show a diff explaining what a helm upgrade would change.
version Show version of the helm diff plugin
Flags:
-h, --help help for diff
--no-color remove colors from the output
--reset-values reset the values to the ones built into the chart and merge in any new values
--reuse-values reuse the last release's values and merge in any new values
--set stringArray set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--suppress stringArray allows suppression of the values listed in the diff output
-q, --suppress-secrets suppress secrets in the output
-f, --values valueFiles specify values in a YAML file (can specify multiple) (default [])
--version string specify the exact chart version to use. If this is not specified, the latest version is used
Additional help topics:
diff
Use "diff [command] --help" for more information about a command.
Error: plugin "diff" exited with error
err: exit status 1
From the looks of it the helmfile binary is not passing the upgrade option into the helm diff command.
@rendhalver As far as I can see from helm-diff's implementation, diff is just deprecated and is still equivalent to diff upgrade. So probably it should just work?
Could you try running helmfile repos before diff in case you had not done so yet?
I synced the repos but I get the same error with just diff.
10:00 $ helmfile --file ./HelmfileTest.yaml diff
exec: helm diff test-site stable/wordpress --version 1.0.0 --set mariadb.persistence.enabled=false,ingress.enabled=true,ingress.hostname=test.example.com,ingress.annotations.kubernetes\.io/ingress\.class=nginx,persistence.enabled=false --kube-context kube-hq
Command "helm diff" is deprecated, use "helm diff upgrade" instead
Error: release: "test-site" not found
Usage:
diff [flags]
diff [command]
Available Commands:
revision Shows diff between revision's manifests
rollback Show a diff explaining what a helm rollback could perform
upgrade Show a diff explaining what a helm upgrade would change.
version Show version of the helm diff plugin
Flags:
-h, --help help for diff
--no-color remove colors from the output
--reset-values reset the values to the ones built into the chart and merge in any new values
--reuse-values reuse the last release's values and merge in any new values
--set stringArray set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--suppress stringArray allows suppression of the values listed in the diff output
-q, --suppress-secrets suppress secrets in the output
-f, --values valueFiles specify values in a YAML file (can specify multiple) (default [])
--version string specify the exact chart version to use. If this is not specified, the latest version is used
Additional help topics:
diff
Use "diff [command] --help" for more information about a command.
Error: plugin "diff" exited with error
err: exit status 1
I tried this with helmfile 0.12 and 0.13
same result with either.
helm is 2.9.0
helm diff plugin is 2.9.0+1
@rendhalver Thx! Error: release: "test-site" not found seems to indicate that you need to firstly run helmfile sync. This is a limitation of helm-diff and we have a feature request to support diff in that case at https://github.com/databus23/helm-diff/pull/15
That doesn't explain why diff isn't passing the upgrade option through to the helm diff command.
Certainly! We'd need to pass upgrade to tolerate the deprecation. I'd like to address that in another issue.
@rendhalver Hey. Thanks for the report and the feedback! I've opened #130 to fix the confusing deprecation warning coming from helm-diff.
Would there be anything we can do for you?
Perhaps it wasn't very clear that you had to run helmfile repos and helmfile sync at least once before runnign helmfile diff?
We run those commands in our CI setup but the command was still failing.
@rendhalver Thanks! That's odd. What was the whole helmfile output when it failed at last?
Sorry I missed what you were talking about before but I see what's going on now.
I commented on the PR you mentioned about.
@rendhalver Thanks for chiming in! Let's keep discussing there.
Will do.
databus23/helm-diff#15 is merged and released in v2.9.0+2, so can be used with --args "--allow-unreleased". It might be nice to set --allow-unreleased at all times, since I can't imagine a time when you'd want helmfile diff upgrade to error on a newly-added release.
Most helpful comment
databus23/helm-diff#15 is merged and released in v2.9.0+2, so can be used with
--args "--allow-unreleased". It might be nice to set--allow-unreleasedat all times, since I can't imagine a time when you'd wanthelmfile diff upgradeto error on a newly-added release.