Skip to content
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

how to add --post-renderer into helm cli ? #2034

Closed
tanguofu opened this issue Dec 26, 2021 · 5 comments
Closed

how to add --post-renderer into helm cli ? #2034

tanguofu opened this issue Dec 26, 2021 · 5 comments

Comments

@tanguofu
Copy link

Helm 3.1+ support Post Rendering: https://helm.sh/docs/topics/advanced/#custom-post-renderers , which can manually manipulate, configure, and/or validate rendered manifests before they are installed by Helm.

So how to add this flags to helmfile?

@mumoshu
Copy link
Collaborator

mumoshu commented Dec 27, 2021

Unforunately it isn't possible! If you're willing to contribute a new feature for that, I'd be more than welcome to review it! Thanks

@tanguofu
Copy link
Author

tanguofu commented Jan 5, 2022

it is same that helmfile with --args="--post-renderer exec" works

@tanguofu tanguofu closed this as completed Jan 5, 2022
@tanguofu tanguofu reopened this Jun 6, 2022
@tanguofu
Copy link
Author

tanguofu commented Jun 6, 2022

there same to has a bug: the --post-renderer arg will pase into helm list but which did not supported.

helmfile  -f k8s/helmfile.yaml   apply --args="--post-renderer=`pwd`/script/rewrite.sh"

came into the error:

Listing releases matching ^unifiedcsi$
in k8s/helmfile.yaml: in .helmfiles[4]: in storage-module/helmfile.yaml: command "/usr/local/bin/helm" exited with non-zero status:

PATH:
  /usr/local/bin/helm

ARGS:
  0: helm (4 bytes)
  1: list (4 bytes)
  2: --filter (8 bytes)
  3: ^ti-unifiedcsi$ (15 bytes)
  4: --namespace (11 bytes)
  5: ti-inf (6 bytes)
  6: --uninstalling (14 bytes)
  7: --deployed (10 bytes)
  8: --failed (8 bytes)
  9: --pending (9 bytes)
  10: --post-renderer=/home/install/helm-charts/script/rewrite.sh (69 bytes)

ERROR:
  exit status 1

EXIT S

i thinks there is two way to fix this:
A: just filter the --post-renderer in helm list function at :

out, err := helm.exec(append(append(preArgs, args...), flags...), env)

B: add a specail flags --post-renderer to helmfile

so which canbe accepted? i d like to contribe with a PR.

many thanks.

@yxxhero
Copy link
Contributor

yxxhero commented Jun 6, 2022

@tanguofu #2148 please see this.

@mumoshu
Copy link
Collaborator

mumoshu commented Jun 6, 2022

-args isn't a fully supported feature because we aren't sure which args should be passed to which helm command(s) helmfile is running. I'd welcome your contribution to make it configurable per release in helmfile.yaml (Perhaps releases[].postRenderer or releases[].postRenders[] if helm supports passing multiple renders to it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants