17 messages
Questions and discussion around helmfile https://github.com/roboll/helmfile and https://github.com/cloudposse/helmfiles
Archive: https://archive.sweetops.com/helmfile/
Balazs Vargaalmost 5 years ago
hello all,
I have a define :
and a template to call it
is there a way to pass params to the define line from template like
If I could pass params like namespace, resource type, endpoint in jsonpath... then I could use only few defines and not lots of...
thanks in advance
I have a define :
{{- define "x" -}}
{{ if .value }}
{{- printf .value -}}
{{ else }}
{{- exec "kubectl" (list "get" "configmap" "data" "-n" "namespace" "--output=jsonpath={.data.userdata }} }" ) -}}
{{ end }}
{{ end }}and a template to call it
userdata: {{ template "x" . }}is there a way to pass params to the define line from template like
(dict "value" .Values.data.user "key" "region")If I could pass params like namespace, resource type, endpoint in jsonpath... then I could use only few defines and not lots of...
thanks in advance
Joaquin Menchacaalmost 5 years ago
How do you configure
helm --name_template in a helmfile.yaml? I didn't see an option for this, and I was digging through the code, I couldn't spot if it was or was not supported.yurialmost 5 years ago(edited)
Hey guys, could not find an answer to what i was looking for…
is there a way to pass ENV VARS to
the plugin supports some flags that im interested in like:
is there a way to pass ENV VARS to
helm-secrets plugin?the plugin supports some flags that im interested in like:
HELM_SECRETS_DRIVER_ARGS and HELM_SECRETS_DEC_SUFFIX, i tried to export them before helmfile runs and also with prepare hooks, but it doesn’t seems to affect the plugin in any way, if i export them and then use directly helm secrets …. it worksCHalmost 5 years ago(edited)
Is it at all possible to set values for a release from a file located inside a chart? Something like:
releases:
- name: my-app
chart: my-helm-repo/my-app
version: 1.0.2
values:
- {{ .Release.ChartPath }}/values/{{ .Environment.Name }}.yamlBalazs Vargaalmost 5 years ago
hello all, let's say I have dev and prod env-s If I would like to deploy dev I just need to run helmfile apply, for prod I need to mention with -e prod apply... is there a way to check it from a variable that I can get from cluster ?
Michael Seiwaldalmost 5 years ago(edited)
Hi all, are remote helmfiles via HTTPS supposed to work? E.g. this helmfile.yaml leads to an error:
helmfiles:
- path: <https://raw.githubusercontent.com/cloudposse/helmfiles/master/releases/external-dns/helmfile.yaml>Arthur Jaronalmost 5 years ago
Hi guys, I’ve just inherited a rather large codebase using helmfile, which is new to me. In there is the following construct:
helmfile.yaml
values.yaml
I’m simply trying to read “testing” from the yaml file, but I get this error message:
What am I doing wrong? This should be trivial from what I’ve read so far…
helmfile.yaml
releases:
- name: namespace-dev
chart: ../../../../charts/namespace
version: 0.0.1
createNamespace: false
values:
- values.yaml
- test: {{ .Values.testing }}
- namespace: devvalues.yaml
testing: yesI’m simply trying to read “testing” from the yaml file, but I get this error message:
in ./helmfile.yaml: in .helmfiles[0]: in namespaces/helmfile.yaml: error during helmfile.yaml.part.0 parsing: template: stringTemplate:11:24: executing "stringTemplate" at <.Values.testing>: map has no entry for key "testingWhat am I doing wrong? This should be trivial from what I’ve read so far…
muhahaalmost 5 years ago(edited)
Guys? Is possible to set kubeconfig context in Helmfile TF
https://github.com/mumoshu/terraform-provider-helmfile/blob/master/pkg/helmfile/resource_release.go#L294
@mumoshu is this intentional ? thanks
helmfile_release_set resource ? Seem its possible in helmfile_release, but not in *_set.https://github.com/mumoshu/terraform-provider-helmfile/blob/master/pkg/helmfile/resource_release.go#L294
@mumoshu is this intentional ? thanks
ANIL KUMAR THATAVARTHIalmost 5 years ago
Can helmfile hooks can be placed in seperate file and include that file under releases section?
I need to manage hooks seperately for each release.
Can it be possible?
I need to manage hooks seperately for each release.
Can it be possible?
Tencho Tenevalmost 5 years ago
Hello, I’ve been trying out helmfile today and want to propose it to my team. However, I stumbled upon an issue with the diff plugin that helmfile uses for
helmfile diff . I’d like to find a workaround or contribute a fix for this before I demo the tool to my team. The revision is added as a label in many of our charts, I don’t know if this is common or bad, but it causes helmfile apply to sync every time. Does anyone have suggestions?muhahaalmost 5 years ago(edited)
Guys? Is possible to render helmfile including namespaces ?
helmfile template does not honor namespaces specified in helmfile.yamlLea Zusmanalmost 5 years ago(edited)
Hi 🙂
I'm trying to add multiple hooks that perform few kubectl commands.
For example,
Now, it looks like there is no way to combine those hooks together (it throws an exception)
is there a way to add few hooks \ few commands in one hook - or is there other way to implement this logic ? (using a bash command and run them all together ? )
🙏 🙏 🙏
I'm trying to add multiple hooks that perform few kubectl commands.
For example,
helmfile.yaml:.....
releases:
.....
- name: XXX
chart: ./charts/...
version: 0.0.1
labels:
testable: true
values:
- ./templates/XXX.values.yaml.gotmpl
hooks:
- events: ["prepare"]
showlogs: true
command: "kubectl"
args: ["annotate", "configMap", "XXX", "-n", "YYY", "<http://meta.helm.sh/release-name=XXX|meta.helm.sh/release-name=XXX>"]
- events: ["prepare"]
showlogs: true
command: "kubectl"
args: ["annotate", "configMap", "XXX", "-n", "YYY", "<http://meta.helm.sh/release-namespace=YYY|meta.helm.sh/release-namespace=YYY>"]
- events: ["prepare"]
showlogs: true
command: "kubectl"
args: ["label", "configMap", "XXX", "-n", "YYY", "<http://app.kubernetes.io/managed-by=Helm|app.kubernetes.io/managed-by=Helm>"]Now, it looks like there is no way to combine those hooks together (it throws an exception)
is there a way to add few hooks \ few commands in one hook - or is there other way to implement this logic ? (using a bash command and run them all together ? )
🙏 🙏 🙏
Jakealmost 5 years ago(edited)
Just a bit curious as to what precedence applies when specifying muliple values against a release e.g.
Do values in
releases:
- name: a
values:
- a.yaml
- b.yamlDo values in
a.yaml override b.yaml (or vice versa)?Brij Sover 4 years ago
Hi all, I’ve been trying to use https://docs.gitlab.com/ee/user/clusters/applications.html#install-gitlab-runner-using-gitlab-cicd
to install gitlab runners on my cluster thats integrated with Gitlab. It mentions that the registration token can be passed in via environment variable which I’ve set in my CICD variables.
However, when I try to run this, my values.yml is not picked up nor is my registration token. Upon investigating, I found their helmfile for it here https://gitlab.com/gitlab-org/cluster-integration/cluster-applications/-/blob/master/src/default-data/gitlab-runner/helmfile.yaml
I notice its doing
but that doesnt seem to be working at all. Any ideas how I could get this to work?
to install gitlab runners on my cluster thats integrated with Gitlab. It mentions that the registration token can be passed in via environment variable which I’ve set in my CICD variables.
However, when I try to run this, my values.yml is not picked up nor is my registration token. Upon investigating, I found their helmfile for it here https://gitlab.com/gitlab-org/cluster-integration/cluster-applications/-/blob/master/src/default-data/gitlab-runner/helmfile.yaml
I notice its doing
{{- if env "GITLAB_RUNNER_GITLAB_URL" }}
- gitlabUrl: "{{ env "GITLAB_RUNNER_GITLAB_URL" }}"
{{- end }}
{{- if env "GITLAB_RUNNER_REGISTRATION_TOKEN" }}
- runnerRegistrationToken: "{{ env "GITLAB_RUNNER_REGISTRATION_TOKEN" }}"
{{- end }}
{{- if env "GITLAB_RUNNER_VALUES_FILE" }}
- {{ env "GITLAB_RUNNER_VALUES_FILE" | quote }}
{{- else }}
- {{ env "CI_PROJECT_DIR" }}/.gitlab/managed-apps/gitlab-runner/values.yaml
{{- end }}but that doesnt seem to be working at all. Any ideas how I could get this to work?
Victoria Hover 4 years ago(edited)
Hey all. I'm brand new to helmfile, testing it out as a way to migrate away from my team's current strategy of using a bash script to clobber together a base helm chart repository with 1+ other repositories with specific environment configurations. The repositories for the different environments contain both definitions files (simple enough to translate to helmfile), as well as specific configuration files that are either added to the base repo or overwrite existing files in the base repo (for example, in apache-httpd2, there is a deployment-specific.conf in the base repo as well as in the repo(s) for the other environments, so that gets overwritten). Does helmfile offer the functionality to insert these environment-specific configuration files depending on the deployment?
Denis Palnitskyover 4 years ago
Hi, I'm using helm file in a CD pipeline to deploy Helm charts from a Gitops repository. It works great and I think you guys did a great job 🏆️ I have to questions:
1. Is there a way to deploy all environments with one command? I want to be able to add env in helmfile in my gitops, commit it and see helmfile deploys it automatically.
2. how do you people solve environment cleanup problem when you run helmfile in a pipeline? For example, I removed a chart or an env from a helmfile in gitops repo and I would like to detect those cleaned up resources automatically and remove them
1. Is there a way to deploy all environments with one command? I want to be able to add env in helmfile in my gitops, commit it and see helmfile deploys it automatically.
2. how do you people solve environment cleanup problem when you run helmfile in a pipeline? For example, I removed a chart or an env from a helmfile in gitops repo and I would like to detect those cleaned up resources automatically and remove them
dennybaaover 4 years ago
Hello @mumoshu. I would like to share my current prototype of a "central remote helmfiles" repository approach. When I was pointing that it would be nice to have remote git sync updates in a GH issue I mentioned that I had an idea on "central repository" like cloudposse...
While without any documentation on cloudposse/helmfiles I haven't seen any goals of using that code, nonetheless I tried to implement an approach that seems suit my needs: https://github.com/dysnix/helmfiles.
Thinking of the upcoming improvements to helmfile, I feel that sharing the above might be a good source for ideas for the next versions🙂 Such as remote values and valueTemplates))
While without any documentation on cloudposse/helmfiles I haven't seen any goals of using that code, nonetheless I tried to implement an approach that seems suit my needs: https://github.com/dysnix/helmfiles.
Thinking of the upcoming improvements to helmfile, I feel that sharing the above might be a good source for ideas for the next versions🙂 Such as remote values and valueTemplates))