22 messages
Questions and discussion around helmfile https://github.com/roboll/helmfile and https://github.com/cloudposse/helmfiles
Archive: https://archive.sweetops.com/helmfile/
Vladimir Avdoshkaover 4 years ago
Hello!
I’m wondering how do you develop/test things locally with Helmfile?
I’m looking for some kind of seamless (automated) process of having the feedback loop on dev environment, wether it be triggered by some change of the code or helm chart or Helmfile. Similar to what one can do with the skaffold.
I’ve opened an issue in Helmfile - https://github.com/roboll/helmfile/issues/1903 to discuss this. Thank you for sharing!
I’m wondering how do you develop/test things locally with Helmfile?
I’m looking for some kind of seamless (automated) process of having the feedback loop on dev environment, wether it be triggered by some change of the code or helm chart or Helmfile. Similar to what one can do with the skaffold.
I’ve opened an issue in Helmfile - https://github.com/roboll/helmfile/issues/1903 to discuss this. Thank you for sharing!
Amosover 4 years ago
Hi folks!
I'm trying to loop over same release but every iteration needs a different set of values per release iteration.
The helmfile looks like this:
What is the best way to achieve that with helmfile ?
https://github.com/roboll/helmfile/issues/1906
I'm trying to loop over same release but every iteration needs a different set of values per release iteration.
The helmfile looks like this:
releases:
{{ range $i, $releases := until .Values.RELEASE_COUNTER }}
{{ $chartNumber := add1 $releases | toString }}
- name: release-number-{{ $chartNumber }}
<<: *default
labels:
app: '{{`{{ .Release.Name }}`}}'
chart: some-chart
tier: core
{{- end }}What is the best way to achieve that with helmfile ?
https://github.com/roboll/helmfile/issues/1906
Ievgenii Shepeliukover 4 years ago
Hi all
the project readme shows
But when using it I received an error
helmfile version
the project readme shows
passCredentials parameter for OCI reposBut when using it I received an error
in ./helmfile.yaml: failed to read helmfile.yaml: reading document at index 1: yaml: unmarshal errors:
line 7: field passCredentials not found in type state.RepositorySpechelmfile version
$ helmfile version
helmfile version v0.139.9Joaquin Menchacaover 4 years ago
Is there any way to patch output of a helm chart in a helmfile?
Without
So I am wondering how I could do the equivalent in helmfile? Make post hook with some patch.json or linkerd inject?
Without
helmfile, I would do something like this:helm template ... | linkerd inject | kubectl apply -f -So I am wondering how I could do the equivalent in helmfile? Make post hook with some patch.json or linkerd inject?
Joaquin Menchacaover 4 years ago(edited)
Is it possible to inline replacement, trying to do equivalent of
I thought I would get this in-place, but then I think it is causing maybe an indentation problem. I am not sure.
I get this error
--set-file without the set-file.releases:
- name: linkerd
namespace: linkerd
chart: linkerd/linkerd2
version: 2.10.2
values:
- identityTrustAnchorsPEM: {{ readFile "certs/ca.crt" }}I thought I would get this in-place, but then I think it is causing maybe an indentation problem. I am not sure.
I get this error
in ./helmfile.yaml: failed to read helmfile.yaml: reading document at index 1: yaml: line 13: could not find expected ':'Joaquin Menchacaover 4 years ago
Is it possible to reference the
{{ .Release.Namespace }} in the helmfile.yaml?Joaquin Menchacaover 4 years ago
I was following docs from https://github.com/roboll/helmfile#labels-overview, where there's an example of
{{ .Release.Name }} , but I get this:err: error during helmfile.yaml.part.0 parsing: template: stringTemplate:7:30: executing "stringTemplate" at <.Release.Name>: can't evaluate field Release in type state.EnvironmentTemplateData
in ./helmfile.yaml: error during helmfile.yaml.part.0 parsing: template: stringTemplate:7:30: executing "stringTemplate" at <.Release.Name>: can't evaluate field Release in type state.EnvironmentTemplateDataJoaquin Menchacaover 4 years ago
I wrote this up, I cannot figure it out from the docs. 😢
https://github.com/roboll/helmfile/issues/1914
https://github.com/roboll/helmfile/issues/1914
Joaquin Menchacaover 4 years ago
After finding a more COMPLETE example online (ref. https://www.arthurkoziel.com/managing-helm-charts-with-helmfile/), I found few things that I was doing wrong, in case anyone interested in this:
• can reference
• cannot seem to use
• can reference
{{{{ .Release.Name }}}} in templates.default values, but not values passed to the helm chart.• cannot seem to use
{{ .Release.Name }} in helmfile under releases: Joaquin Menchacaover 4 years ago
I eventually settled on:
I wish that I could use if blocks around the
repositories:
- name: linkerd
url: <https://helm.linkerd.io/stable>
templates:
default: &default
chart: linkerd/{{`{{ .Release.Name }}`}}
missingFileHandler: Warn
values:
- ./values/{{`{{ .Release.Name }}`}}.yaml.gotmpl
- installNamespace: false
releases:
- name: linkerd2
namespace: linkerd
<<: *default
- name: linkerd-viz
namespace: linkerd-viz
<<: *default
- name: linkerd-jaeger
namespace: linkerd-jaeger
<<: *defaultI wish that I could use if blocks around the
.Release.Name, but as these are rendered later, that is not possible. I wish I could also reference the .Release.Name in the helm chart values themselves, as that would be useful.U
Unknown Userover 4 years ago(edited)
How many of you received any help from this chat
Joaquin Menchacaover 4 years ago
On my helmfile templates exploration, I wish I could use the
In the case of my linkerd use case, then extensions are all consistent, and because linkerd is more unique and requires deploying CRD plus other components that take a few minutes to come up, I may have these as separate stages, maybe through environments, and let the operator determine when to install the extensions. The other problem is that there might be some rate limit to access docker images from Azure (some anti-competitiveness), but cannot prove 100%, just noticing behavior from Azure to where Linkerd stores their images (AWS) with CrashBackOffs.
.Release.Name, to branch, like if you are this chart, do this thingy. The best that can be done is to put the chart specific changes values file that is fetched using .Release.Name as part of the file name. There will undoubtedly be redundancy. In looking at github issues, it would look like that to change this current behavior would require some major refactoring, especially as .Release.Name is determine later in the process.In the case of my linkerd use case, then extensions are all consistent, and because linkerd is more unique and requires deploying CRD plus other components that take a few minutes to come up, I may have these as separate stages, maybe through environments, and let the operator determine when to install the extensions. The other problem is that there might be some rate limit to access docker images from Azure (some anti-competitiveness), but cannot prove 100%, just noticing behavior from Azure to where Linkerd stores their images (AWS) with CrashBackOffs.
Luchoover 4 years ago
Hi folks, how are you? I'm new with helm and I want to know if helmfile can help me to deploy Application and Database at the same time. I want to deploy Database only If some flag is true inside my values(eg: mongo.enabled.true )... Someone here have experience doing it ? Or do you recommend another idea?
Thanks a lot!
Thanks a lot!
vickenover 4 years ago(edited)
Hi all
I’m trying to reconcile what the difference between these two (inline vs file) could be (v0.139.9):
I am able to do this, the value with the “env” gets picked up with
environments.yaml
However, it seems referencing the same “env” in a values file does not work. Getting an error
environments.yaml
values/myenv.yaml
Not sure if this is also supposed to work or not
I’m trying to reconcile what the difference between these two (inline vs file) could be (v0.139.9):
I am able to do this, the value with the “env” gets picked up with
FOO=bar helmfile -e myenv diffenvironments.yaml
environments:
myenv:
values:
- foo: {{ env "FOO" }}However, it seems referencing the same “env” in a values file does not work. Getting an error
in helmfile.d/environments.yaml: failed to read environments.yaml: failed to load environment values file "values/myenv.yaml": yaml: invalid map key: map[interface {}]interface {}{"env \"FOO\"":interface {}(nil)}environments.yaml
environments:
myenv:
values:
- values/myenv.yamlvalues/myenv.yaml
foo: {{ env "FOO" }}Not sure if this is also supposed to work or not
Ihor Urazovover 4 years ago
Is there a sensible way install CRDs from urls prior to installing chart that depends on CRDs availability via just helmfile? For example this chart requires CRDs to be installed via kubectl https://github.com/piraeusdatastore/helm-charts/tree/main/charts/snapshot-validation-webhook
batisteinover 4 years ago
Hello all,
helmfile is really a great tool. However, there is a use-case that I have all the time and wondered if my cumbersome way is the right one.
I have to add for example istio virtualService and Gateway templates to several charts. Optimal would be a way where I can add templates.
Currently I solve the problem by creating a new chart that contains these templates but this is not very good because I can't reuse values from the original chart and also not the helper.tpl....
Is there any smarter way?
helmfile is really a great tool. However, there is a use-case that I have all the time and wondered if my cumbersome way is the right one.
I have to add for example istio virtualService and Gateway templates to several charts. Optimal would be a way where I can add templates.
Currently I solve the problem by creating a new chart that contains these templates but this is not very good because I can't reuse values from the original chart and also not the helper.tpl....
Is there any smarter way?
batisteinover 4 years ago
Hello together,
I have several helmfiles which I want to bundle. So far I do this via
However I then lose the parallel processing of releases. Is there a way to wrap helmfiles and still specify that some of the subhelmfiles can run in parallel?
I have several helmfiles which I want to bundle. So far I do this via
helmfiles: in another helmfile.However I then lose the parallel processing of releases. Is there a way to wrap helmfiles and still specify that some of the subhelmfiles can run in parallel?
Sean Sover 4 years ago(edited)
Hello everyone, Is it possible to construct
helmfile dynamically from a yaml config file or some other format? I wanted have a service specific config file where I can define all my dependencies and then on run time it constructs a helmfilemuhahaover 4 years ago
Guys? I am trying to recreate map from values to CR, but getting null instead, any idea? Thanks
environments:
default:
values:
- applications:
- name: test-app
spec:
project: test-project
source:
repoURL: <https://git.example.com/foo/bar>
targetRevision: HEAD
path: john/doe
destination:
server: <https://example.com>
namespace: argocd
repositories:
- name: incubator
url: <https://charts.helm.sh/incubator>
releases:
- name: argocd-applications
namespace: argocd
createNamespace: true
chart: incubator/raw
version: 0.2.3
values:
- resources:
{{- range $pIndex, $application := .Values.applications }}
- apiVersion: <http://argoproj.io/v1alpha1|argoproj.io/v1alpha1>
kind: Application
metadata:
name: {{ $application.name }}
namespace: argocd
finalizers:
- <http://resources-finalizer.argocd.argoproj.io|resources-finalizer.argocd.argoproj.io>
spec:
{{- toYaml $application.spec | nindent 6 }}
{{- end }}Sean Sover 4 years ago
hello everyone, can we've
helmfile defined in some-other repo ? which point to chart that reside in some other github repoTomover 4 years ago
Hello, is there any way to include encoded secret.yaml inside helfile via gitlab url raw file? I’ve tried using url: as well ref+sops wo any result
Sean Sover 4 years ago
hello All, can we create a template / yaml file with app configurations and create helmfile dynamically using this template config file?