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

provide special flags to environment for certain stages #794

Open
Morriz opened this issue Aug 7, 2019 · 7 comments
Open

provide special flags to environment for certain stages #794

Morriz opened this issue Aug 7, 2019 · 7 comments

Comments

@Morriz
Copy link

Morriz commented Aug 7, 2019

I would like to be able to infer that a chart is beying installed or destroyed, so that I can make better use of exec.

Scenario:

Some apps in the wild don't support helm or not fully (knative, cert-manager etc), but I would like to use helmfile ordering to install their manifests at the right time.

So I create a basic deploy script that either does a k apply -f $FOLDER, or, and that is about my request, it does a k delete -f $FOLDER.

@Morriz
Copy link
Author

Morriz commented Aug 7, 2019

And I can't use raw directly, as it's unfeasible to dissect the manifests and massage them into the supported format by raw.

@mumoshu
Copy link
Collaborator

mumoshu commented Aug 7, 2019

@Morriz Hey! It's still rough around the edges but I believe you can benefit from #673.

With it, you should be able to specify a directory containing k8s manifests in chart, like chart: ./manifests so that helm-x magically determines it as a k8s manifests and automatically turns it into a helm chart.

We don't need differentiation between apply/delete. Just run helmfile destroy/delete to delete everything, or set installed: false as similar as a release based on a regular chart to uninstall the specific release.

@Morriz
Copy link
Author

Morriz commented Aug 10, 2019

Wow, that would be an elaborate solution...awesome!

@Morriz
Copy link
Author

Morriz commented Aug 10, 2019

Would it also know how to escape {{ and }} in embedded templates? Like in grafana dashboard json?

@mumoshu
Copy link
Collaborator

mumoshu commented Aug 10, 2019

@Morriz Are you trying to escape {{ and }} in helmfile.yaml and values.yaml.gotmpl files?

Then try:

{{`

and

`}}

like

{{`{{ .foo.bar }}`}}

This renders to a text of {{ .foo.bar }}.

@mumoshu
Copy link
Collaborator

mumoshu commented Aug 10, 2019

Ah sry I misunderstood your question.
helm-x doesn't process any template expression seen in files under chart: ./yourmanifests or chart: ./yourkustomization. So it doesn't need to know about escaping.

@Morriz
Copy link
Author

Morriz commented Aug 11, 2019

Ah, great. Than I can ditch my custom skeleton app solution...will try soon

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

No branches or pull requests

2 participants