#helmfile - November 2020

November 2020
Joaquin Menchaca
Joaquin Menchacaabout 6 years ago
How's this for a logo? (I didn't make it, got it from codefresh)
J Alkjær
J Alkjærabout 6 years ago(edited)
Hi All, as part of our git-ops pipeline we run helmfile lint. We have just added a remote chart (stable/spark-operator) but the linter pukes with
templates/crds.yaml: the kind "<http://apiextensions.k8s.io/v1beta1|apiextensions.k8s.io/v1beta1> CustomResourceDefinition" is deprecated in favor of "<http://apiextensions.k8s.io/v1|apiextensions.k8s.io/v1> CustomResourceDefinition"

Besides forking / self-hosting the chart with a fix, what options do we have (version is "hardcoded" in the crd.yaml)?
Is there a way to configure the linter rules pr release (couldn't find a way to pass args to helm lint) - or simply disable linting that specific release
Curtis Ruck
Curtis Ruckabout 6 years ago
is there a good way to gather data from charts already deployed to feed as values into subsequent charts? via hooks or something? use case is one chart deployment generates a uuid we need to pull to provide to a subsequent chart in values
rss
rssabout 6 years ago(edited)
v0.132.2: Fix INLINECODE_0 with INLINECODE_1 (#1564)
87e86dc (HEAD, tag: v0.132.2, origin/master, origin/HEAD, master) Fix helmfile --selector x=y template with needs (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="734095869" data-permission-text="Title...
yuri
yurialmost 6 years ago
hey guys, anyone using both helm2 and 3 with the same release files? im loading helmdefaults base in a release that should be installed with helm2 and 3 based on env
how do i get rid of this when running with helm3?
executing "stringTemplate" at <.Values.tillerNamespace>: map has no entry for key "tillerNamespace"
rss
rssalmost 6 years ago(edited)
v0.132.3: Fix redundant helm-dep-build and prepare hook regression (#1566)
Fixes #1511
Fixes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="707725401" data-permission-text="Title is private"...
rss
rssalmost 6 years ago(edited)
v0.133.0: feat: Add INLINECODE_0 (#1568)
6b86408 (HEAD, tag: v0.133.0, origin/master, origin/HEAD, master) feat: Add helmfile template --include-crds (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="736498829" data-permission-text="Title is...
rss
rssalmost 6 years ago(edited)
v0.132.3: Fix redundant helm-dep-build and prepare hook regression (#1566)
bdbaa00 (HEAD, tag: v0.132.3, master) Fix redundant helm-dep-build and prepare hook regression (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="735731920" data-permission-text="Title is private"...
Craig Dunford
Craig Dunfordalmost 6 years ago
I was doing some reading the archives of sweetops and saw a discussion (looked like @Erik Osterman (Cloud Posse) was involved) about pulling off Blue/Green deployments with helmfile. I didn't find the specific example that was discussed. Does anyone have any examples of executing Blue/Green deployments governed by helmfile ?
rss
rssalmost 6 years ago(edited)
v0.134.0: Bump dependencies (#1573)
709913b (HEAD, tag: v0.134.0, origin/master, origin/HEAD, master) Bump dependencies (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="737365351" data-permission-text="Title is private"...
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 6 years ago
Just a heads up: we've published all of our new helmfiles that we've been using for the past year.
Mykola
Mykolaalmost 6 years ago
Hi
Thanks for the great app. I have one question
In release 0.132.1 was added skipDeps parameter. As our developers work on different helmfile version I'm trying to add something for backward compatibility with the older versions
I've added to the helmfiles/common/helm-config.yaml
{{ if ge (exec "helmfile" (list "version" "|" "sed 's/^.*v//'")) "0.132.1" }}
  skipDeps: true
{{ end }}

It works with the current version but older still have an issue
: failed to read common/helm-config.yaml: reading document at index 1: yaml: unmarshal errors:
line 2: field skipDeps not found in type state.HelmState

Has anyone solved this issue? Thanks
rss
rssalmost 6 years ago(edited)
v0.134.1: Fix INLINECODE_0 not to break with INLINECODE_1 (…
f6bf885 (HEAD, tag: v0.134.1, origin/master, origin/HEAD, master) Fix helmfile template --include-crds not to break with chartify (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="741161059"...
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)almost 6 years ago
I plan to move these notifications to #releases
rei
reialmost 6 years ago
@Andriy Knysh (Cloud Posse)
Thank you for updating the helmfiles. Although I have some issues with them, specially the "environment" configuration. Compared to other CP modules, specially Terraform, the use of environment and stage and namespace is very opinionated. For example here I do need to set the stage even if we only use the namespace and environment(=dev, prod, etc.).
https://github.com/cloudposse/helmfiles/blob/master/releases/cert-manager/helmfile.yaml#L67
Yeah specifying stage: environment would skip this, however it crates confusion and it collides with the handling in other nodules.

Any ideas on how to improve this?

Maybe add some base yaml/gotpl analogous to heml helpers templates to generate base-variables. Similar to the context.tf and label TF module?
Justin Seiser
Justin Seiseralmost 6 years ago
Anyone have any experience dealign with the Kubernetes Raw chart? I want to create a TLS secret, but I only appear able to do so, if I pass in the values directly. If I reference a secrets or values file, it errors out.
Justin Seiser
Justin Seiseralmost 6 years ago
Like, this works
Justin Seiser
Justin Seiseralmost 6 years ago(edited)
environments:
  default:
    secrets:
    - helm_vars/default/certs/secrets.yaml
    - helm_vars/default/linkerd-cert-manager/secrets.yaml

releases:
  - name: linkerd-cert-manager
    namespace: linkerd
    chart: ./raw/
    needs:
      - cert-manager/cert-manager
    wait: true
    missingFileHandler: Error
    values:
      - resources:
        - apiVersion: v1
          kind: Secret
          metadata:
            name: linkerd-trust-anchor
          type: <http://kubernetes.io/tls|kubernetes.io/tls>
          data:
            tls_cert: {{ .Values.linkerd_cert | b64enc | quote }}
            tls_key: {{ .Values.linkerd_key | b64enc | quote }}
        - apiVersion: <http://cert-manager.io/v1alpha3|cert-manager.io/v1alpha3>
          kind: Issuer
          metadata:
            name: linkerd-trust-anchor
            namespace: linkerd
          spec:
            ca:
              secretName: linkerd-trust-anchor
        - apiVersion: <http://cert-manager.io/v1alpha3|cert-manager.io/v1alpha3>
          kind: Certificate
          metadata:
            name: linkerd-identity-issuer
            namespace: linkerd
          spec:
            secretName: linkerd-identity-issuer
            duration: 24h
            renewBefore: 1h
            issuerRef:
              name: linkerd-trust-anchor
              kind: Issuer
            commonName: identity.linkerd.cluster.local
            isCA: true
            keyAlgorithm: ecdsa
            usages:
            - cert sign
            - crl sign
            - server auth
            - client auth
Justin Seiser
Justin Seiseralmost 6 years ago
but If I move this to a values.yaml it breaks
Justin Seiser
Justin Seiseralmost 6 years ago

STDERR:

Error: failed to parse /var/folders/_v/82h1zgqd5zg63wr6wb7t5qdw0000gp/T/values294919079: error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{".Values.tls_cert | b64enc | quote":interface {}(nil)}
Justin Seiser
Justin Seiseralmost 6 years ago
o i think i got it.
Justin Seiser
Justin Seiseralmost 6 years ago
need to be values.yaml.gotmpl
Justin Seiser
Justin Seiseralmost 6 years ago
Sad thing.. I opened a ticket like this, and it was explained to me before, and I literally just now understood
Justin Seiser
Justin Seiseralmost 6 years ago
Justin Seiser
Justin Seiseralmost 6 years ago
im a thick one.
rei
reialmost 6 years ago(edited)
I had myself a bad experience with helmfile today: suddenly helmfile was unable to apply the charts. The diff plugin kept crashing. At the end it was the kubecontext.
Saddly I need to specify it in the cmd line. Using the kubeContext key in the defaults config did not work as expected. I should write an issue...
D
discoursealmost 6 years ago
Vugar
Vugaralmost 6 years ago
Greetings! I was wondering if anyone knows why it was decided not to use {{.Values}} for 'condition:' field in the helmfile? It seems like there is at least one related issue here... I wonder if there are some other considerations on the matter? I can see that Cloud Posse helmfiles do not use 'condition:' field at all... it will be interesting to hear your opinion on this field in general. Thank you!
D
discoursealmost 6 years ago
btai
btaialmost 6 years ago(edited)
is there a way to show the generated kubernetes yaml files from helmfile?
Ievgenii Shepeliuk
Ievgenii Shepeliukalmost 6 years ago
Hi all
It is about using helmfile with jsonPatches
- doing helmfile deps is causing some transformations, but it should not, i suppose
- values passed to helmfile apply /helmfile sync via --set or --values arguments are ignored while applying the patch, only way is to pass those values via helmfile.yaml

It seems there is no open isses for that
Ievgenii Shepeliuk
Ievgenii Shepeliukalmost 6 years ago(edited)
Hi again, I am trying to build a docker image from this Dockerfile
using a following command
$ docker build -t eshepelyuk/helmfile -f Dockerfile.helm3 .

I know that there's a docker image available, but I'm trying to create a Pull Request, so I have to build the image myself to test my PR.

And I am receiving such error

Ievgenii Shepeliuk
Ievgenii Shepeliukalmost 6 years ago
go: downloading <http://github.com/Azure/go-autorest/autorest/to|github.com/Azure/go-autorest/autorest/to> v0.3.0
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GOFLAGS=-mod=vendor go build -o "dist/helmfile_linux_amd64" -ldflags '-X <http://github.com/roboll/helmfile/pkg/app/version.Version=v0.135.0|github.com/roboll/helmfile/pkg/app/version.Version=v0.135.0>'
go: inconsistent vendoring in /workspace/helmfile:
        <http://github.com/Azure/azure-sdk-for-go@v35.0.0+incompatible|github.com/Azure/azure-sdk-for-go@v35.0.0+incompatible>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/Masterminds/semver/v3@v3.1.0|github.com/Masterminds/semver/v3@v3.1.0>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/Masterminds/sprig/v3@v3.1.0|github.com/Masterminds/sprig/v3@v3.1.0>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/aryann/difflib@v0.0.0-20170710044230-e206f873d14a|github.com/aryann/difflib@v0.0.0-20170710044230-e206f873d14a>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/frankban/quicktest@v1.11.2|github.com/frankban/quicktest@v1.11.2>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/go-test/deep@v1.0.7|github.com/go-test/deep@v1.0.7>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/golang/mock@v1.4.4|github.com/golang/mock@v1.4.4>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/google/go-cmp@v0.5.2|github.com/google/go-cmp@v0.5.2>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/gosuri/uitable@v0.0.4|github.com/gosuri/uitable@v0.0.4>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/hashicorp/go-getter@v1.5.0|github.com/hashicorp/go-getter@v1.5.0>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/hashicorp/go-retryablehttp@v0.6.3|github.com/hashicorp/go-retryablehttp@v0.6.3>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/hashicorp/go-version@v1.2.1|github.com/hashicorp/go-version@v1.2.1>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/howeyc/gopass@v0.0.0-20190910152052-7cb4b85ec19c|github.com/howeyc/gopass@v0.0.0-20190910152052-7cb4b85ec19c>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/imdario/mergo@v0.3.11|github.com/imdario/mergo@v0.3.11>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/konsorten/go-windows-terminal-sequences@v1.0.2|github.com/konsorten/go-windows-terminal-sequences@v1.0.2>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/pierrec/lz4@v2.3.0+incompatible|github.com/pierrec/lz4@v2.3.0+incompatible>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/r3labs/diff@v1.1.0|github.com/r3labs/diff@v1.1.0>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/spf13/cobra@v1.1.1|github.com/spf13/cobra@v1.1.1>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/tatsushid/go-prettytable@v0.0.0-20141013043238-ed2d14c29939|github.com/tatsushid/go-prettytable@v0.0.0-20141013043238-ed2d14c29939>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/urfave/cli@v1.22.5|github.com/urfave/cli@v1.22.5>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/variantdev/chartify@v0.5.0|github.com/variantdev/chartify@v0.5.0>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/variantdev/dag@v0.0.0-20191028002400-bb0b3c785363|github.com/variantdev/dag@v0.0.0-20191028002400-bb0b3c785363>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://github.com/variantdev/vals@v0.11.0|github.com/variantdev/vals@v0.11.0>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://go.uber.org/multierr@v1.6.0|go.uber.org/multierr@v1.6.0>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://go.uber.org/zap@v1.16.0|go.uber.org/zap@v1.16.0>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://golang.org/x/sync@v0.0.0-20201020160332-67f06af15bc9|golang.org/x/sync@v0.0.0-20201020160332-67f06af15bc9>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://gopkg.in/square/go-jose.v2@v2.4.0|gopkg.in/square/go-jose.v2@v2.4.0>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://gopkg.in/yaml.v2@v2.3.0|gopkg.in/yaml.v2@v2.3.0>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        gotest.tools@v2.2.0+incompatible: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        gotest.tools/v3@v3.0.3: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
        <http://k8s.io/apimachinery@v0.19.3|k8s.io/apimachinery@v0.19.3>: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt

run 'go mod vendor' to sync, or use -mod=mod or -mod=readonly to ignore the vendor directory
make: *** [Makefile:37: static-linux] Error 1
The command '/bin/sh -c make static-linux' returned a non-zero code: 2
Ievgenii Shepeliuk
Ievgenii Shepeliukalmost 6 years ago

Could anyone help ?
Gus Narea
Gus Nareaalmost 6 years ago(edited)
Hey folks. I have this helmfile.yaml where I'm trying to pass the namespace to a presync hook: https://github.com/relaycorp/cloud-gateway/blob/2f3fd5331342302ce52354386d87b76c07975717/charts/helmfile.yaml#L45-L46

.Release.Name is resolved properly but .Namespace resolves to an empty string. I've also tried .Release.Namespace. What else should I try?
muhaha
muhahaalmost 6 years ago
anyone tried to run https://registry.terraform.io/providers/mumoshu/helmfile in terraform cloud ? not sure how to add actual helm & helmfile binaries there..
Zbigniew Żołnierowicz
Zbigniew Żołnierowiczalmost 6 years ago
Hey! I was wondering - does anyone here have a working example of a Helmfile with Traefik configured? I could really use some pointers.
yuri
yurialmost 6 years ago
hey guys, is there a way to generate/deploy with kustomize from git url?
for example
apiVersion: <http://kustomize.config.k8s.io/v1beta1|kustomize.config.k8s.io/v1beta1>
kind: Kustomization
namespace: kubernetes-operator-system
resources:
  - <http://github.com/mycompany/kubernetes-operator/config/default|github.com/mycompany/kubernetes-operator/config/default>
images:
  - name: abc/abc:snapshot

how can i do it with helmify?