#helmfile - February 2023

February 2023
Jim
Jimover 3 years ago
Moving towards helmfile v1.0 the --args parameter is going to be removed: https://github.com/helmfile/helmfile/blob/main/docs/proposals/towards-1.0.md
Does that mean it'll be removed from all commands (and for my use case specifically the helmfile template command)?
In one of our pipelines we do the following to render one specific template in our Helm chart:
CONFIG_FILES=$(helmfile -l name=heweb template --skip-deps --args '--show-only templates/config-files.yaml')

Then later it extracts files from the expanded template and performs some tests against them (such as linting).
There doesn't seem to be an equivalent --show-only flag for the helmfile template command.
Gajanand Singh
Gajanand Singhover 3 years ago
Any source from where I can learn and understand, how to write a good helm charts!?
Viacheslav
Viacheslavover 3 years ago(edited)
Hi guys,
I am trying to install kubeflow "pipeline" component distributed as Kustomization, like it mentioned in "Advanced features" of helmfile.
But as mentioned in kubeflow prerequisites , kustomize 4.5.7 renders manifests in different order than 3.2.0, so I got an error that CRDs should be installed first (I compared outputs of helmfile template and kustomize build - there are really difference in ordering of resources)
Is there any way to pass kustomize build --reorder legacy flag in helmfile, when I install kustomizations in helmfile.yaml? Maybe there are any other option to control order or kustomized resources? I am using helmfile v0.149.0
Thanks
Greg Golin
Greg Golinover 3 years ago
So I think I am breaking helmfile in an unexpected way? Trying to release 20-25 charts and getting a timeout error:STDERR:
E0225 00:33:50.984329 541 round_tripper.go:63] CancelRequest not implemented by *cli.retryingRoundTripper
E0225 00:33:50.984398 541 memcache.go:238] couldn't get current server API group list: Get "https://rancher-cluster/k8s/clusters/foo-bar/api?timeout=32s": net/http: request canceled (Client.Timeout exceeded while awaiting headers)
Error: UPGRADE FAILED: could not get apiVersions from Kubernetes: could not get apiVersions from Kubernetes: Get "https://rancher-cluster/k8s/clusters/foo-bar/api?timeout=32s": net/http: request canceled (Client.Timeout exceeded while awaiting headers)
Greg Golin
Greg Golinover 3 years ago
yeah if i reduce the number of releases in the top level helmfile the job succeeds. interesting.
Greg Golin
Greg Golinover 3 years ago
it seems to be caused by latency. i am running helmfile in north america against a k8s cluster in europe.
Brandon
Brandonover 3 years ago
I am having trouble getting the exec function to work. I am trying to set the value from a yaml file into a values.yaml.gotmpl.

the yaml file:
image:
  registry: <http://some.registry.com|some.registry.com>
  repository: some-repo
  tag: "0.1.1"
  pullPolicy: "Always"
  pullSecrets:
    - "my-secret"

my current gotmpl attempt:
image: |
  {{ exec  "cat some-file.yaml | yq '.image'" }}

The goal is for the resulting gotmpl will be identical to the yaml file.

It fails with the error

error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type map[string]interface {}

Which likely isn't a helpful error, as I believe that is coming from helmfile templating the chart after the exec command succeeded. But I can't get helmfile to show me the yaml it generated.
Marcus Ramberg
Marcus Rambergover 3 years ago
hmm, seems like kustomize 4 detection isn’t working with the nix package for kustomize. Probably because they are passing some flagst to set the git-commit somehow
Marcus Ramberg
Marcus Rambergover 3 years ago
{Version:4.5.4 GitCommit:kustomize/v4.5.4 BuildDate:1970-01-01T00:00:00Z GoOs:linux GoArch:arm64}