#helmfile (2019-01)

https://github.com/helmfile/helmfile

Questions and discussion around helmfile https://github.com/roboll/helmfile and https://github.com/cloudposse/helmfiles

Archive: https://archive.sweetops.com/helmfile/

2019-01-08

daveyu avatar
daveyu
09:53:13 PM

@daveyu has joined the channel

daveyu avatar

I’m trying to set container args so the spec in the deployment manifest looks like this:

    spec:
      containers:
      - args:
        - -endpoint
        - $(ES_ENDPOINT)

However, when using the monochart and specifying like this:

        deployment:
          pod:
            args:
              - -endpoint
              - $(ES_ENDPOINT)

This is the manifest that gets generated:

    spec:
      containers:
      - args:
        - -endpoint $(ES_ENDPOINT)

Any ideas?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

I think there was a recent bug with this

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@Andriy Knysh (Cloud Posse) was that fixed?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@Igor Rodionov

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

(btw, a bunch of open PRs against monochart https://github.com/cloudposse/charts/pulls)

cloudposse/charts

The “Cloud Posse” Distribution of Kubernetes Applications - cloudposse/charts

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
[monochart] Add `container.command` by aknysh · Pull Request #185 · cloudposse/charts

what Add container.command to monochart's cronjob, daemonset, deployment, job and statefulset why To be able to override ENTRYPOINT from containers' Docker images Need to override ENTRYP…

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

hmm… i did not see those issues, maybe from some recent additions

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

looks like we only support args as a string

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
cloudposse/charts

The “Cloud Posse” Distribution of Kubernetes Applications - cloudposse/charts

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

are you running the latest release?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

0.9.0

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

we always supported args as strings, but after the latest addition from @Igor Rodionov I think it could be yaml now https://github.com/cloudposse/charts/blob/master/incubator/monochart/templates/deployment.yaml#L56

daveyu avatar

this is with 0.8.0

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

update to 0.9.0 and test with yaml

daveyu avatar

will do. thanks

daveyu avatar

so.. i can’t figure out how it should be as yaml

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

sec

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

My guess is this should look something like

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
args:
{{ toYaml .Values.deployment.pod.args | indent 10 }}
Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

basically, put it on a new line

2019-01-16

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Use any guy repo with Helmfile https://github.com/aslafy-z/helm-git

aslafy-z/helm-git

Helm plugin to get charts from Git, even if non-packaged. - aslafy-z/helm-git

1
Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@Igor Rodionov

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@Daren

Daren avatar

Nice, looks like a better implementation.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

yea, uses git protocol scheme so it’s compatible with all helm tools

mumoshu avatar
mumoshu

Yep helm-git seems GREAT. I’m even considering to include it in helmfile’s docker image https://github.com/roboll/helmfile/issues/436

1
mumoshu avatar
mumoshu

How about adding a “mixins” to helmfile? I need your feedback(s)! https://github.com/roboll/helmfile/issues/428#issuecomment-455055033

Prescriptive directory structure for "magic" values files · Issue #428 · roboll/helmfile

I've written a helmfile containing abut 40 releases and I'm having to repeat myself a lot: Example: - name: heapster namespace: kube-system chart: stable/heapster version: 0.3.2 values: - &…

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Not something that immediately jumps out at me.

Prescriptive directory structure for "magic" values files · Issue #428 · roboll/helmfile

I've written a helmfile containing abut 40 releases and I'm having to repeat myself a lot: Example: - name: heapster namespace: kube-system chart: stable/heapster version: 0.3.2 values: - &…

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@Igor Rodionov @alebabai @joshmyers @Andriy Knysh (Cloud Posse) any opinion?

mumoshu avatar
mumoshu

And also a gomplate integration for sourcing helm chart values from vault (and more in the future https://github.com/roboll/helmfile/issues/392#issuecomment-455061273

Feat: Allow simple Vault integration · Issue #392 · roboll/helmfile

Currently there are many users that want to integrate Vault with Kubernetes, but there are no high level tools for this. The current Kubernetes AuthMethod for Vault is too complex and coupled to th…

1
1
mumoshu avatar
mumoshu

Have you ever wanted to write {{ readFile "whatever" | tpl . }} in your helmfile templates? https://github.com/roboll/helmfile/issues/420

Support for helm tpl function · Issue #420 · roboll/helmfile

Hi! Helm can render a file template with tpl function, helmfile has readFile option, but it reads file "as is". It would be nice to have tpl alternative here. Maybe you can: render files …

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

It sounds cool, but I haven’t specifically needed it

Support for helm tpl function · Issue #420 · roboll/helmfile

Hi! Helm can render a file template with tpl function, helmfile has readFile option, but it reads file "as is". It would be nice to have tpl alternative here. Maybe you can: render files …

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

however… I think @alebabai has wanted it

mumoshu avatar
mumoshu

hi @alebabai do you have any use-case regarding this feature?

zadkiel avatar
zadkiel
07:36:46 AM

@zadkiel has joined the channel

2019-01-17

zadkiel avatar
zadkiel

Hi guys, i’m struguling trying to make helmfile (helm diff) work with my git plugin

zadkiel avatar
zadkiel

it looks like the HELM_HOME isn’t set and as the plugin uses helm cmd it fails

zadkiel avatar
zadkiel
Error: Couldn't load repositories file (repository/repositories.yaml).
You might need to run `helm init` (or `helm init --client-only` if tiller is already installed)
Error: found in requirements.yaml, but missing in charts/ directory: webhook

within my git downloader plugin called by helm diff

zadkiel avatar
zadkiel

I fixed it by setting up a temporary helm home in a temp file:

  HELM_HOME=$(mktemp -d)
  trap 'rm -rf "$HELM_HOME"' EXIT
  helm init --client-only --home "$HELM_HOME" 
  export HELM_HOME

Still, I can’t access to the existing repositories.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

What is the error you are getting now?

zadkiel avatar
zadkiel

No more error now, but the plugins resolves dependencies for plugin (with helm dependency update) without using the existing user repositories as I had to setup a temporary helm home

zadkiel avatar
zadkiel

Now I hit something else,

    hooks:
    - events: ['prepare']
      command: 'kubectl'
      args: ['{{if eq .HelmfileCommand "delete"}}delete{{else}}apply{{end}}', '-f', '<https://gist.githubusercontent.com/aslafy-z/8725d10394b6f434ce0da65accfc994b/raw/fb32e659e97da5bd9a8a91dcd7e0de6d2a891b81/cert-manager-0.5.2-crd.yaml>']

gives me

error during helmfile.yaml parsing: template: stringTemplate:27:22: executing "stringTemplate" at <.HelmfileCommand>: can't evaluate field HelmfileCommand in type tmpl.TemplateData
zadkiel avatar
zadkiel

There should be at least one more hook who triggers on a release delete

zadkiel avatar
zadkiel

I should be able to use this kind of templating right?

zadkiel avatar
zadkiel

@Erik Osterman (Cloud Posse) any clue?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

(we are not using hooks yet…)

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

but i like what you’re trying to do

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

we could use that too…e.g. with kiam to annotate a namespce

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@Igor Rodionov

Igor Rodionov avatar
Igor Rodionov

I saw helmfile hooks just today

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@zadkiel rather than use kubectl, have you considered using the raw chart?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
helm/charts

Curated applications for Kubernetes. Contribute to helm/charts development by creating an account on GitHub.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
cloudposse/charts

The “Cloud Posse” Distribution of Kubernetes Applications - cloudposse/charts

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

We can deploy nearly any service without writing a helm chart

2019-01-18

zadkiel avatar
zadkiel

Waw that’s cool! Fits perfectly helmfile

Wouldn’t it be somewhat bloated to use a full chart just to deploy a crd? Should I add the base chart (cert-manager) and his crd as realease in a single helmfile? And then depend on this helmfile within another one?

Any idea why the templating line I send doesn’t work?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)


Wouldn’t it be somewhat bloated to use a full chart just to deploy a crd?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

my preference is consistency

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

with helm, we get a history of releases/changes

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

we treat it like an OS package manager

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

prefer apk add something over tar -zvxf something.tar.gz && make -C something all install so to say

2019-01-19

zadkiel avatar
zadkiel

Sure, will try it! Still, any idea about the templating issue ? :/

2019-01-20

mumoshu avatar
mumoshu

@zadkiel Hey! I guess you need to defer template execution.

Raw template exprs like ` {{ .Foo.Bar }} ` are executed at parsing helmfile.yaml. What you need there is defer the execution of {{ .Helmfile.Command ... }} until each release is processed(which is where the hook happens).

Try using golang template comments for that.

More concretely,

{{if eq .HelmfileCommand "delete"}}delete{{else}}apply{{end}}

should be rewritte to:

"{{`{{if eq .HelmfileCommand "delete"}}delete{{else}}apply{{end}}`}}"
1

2019-01-21

mumoshu avatar
mumoshu

Gathering feedbacks on helmfile values https://github.com/roboll/helmfile/issues/430

`helmfile values` to output final resolution of values and secrets · Issue #430 · roboll/helmfile

This is a feature request. This is entirely for debugging purposes and should include secrets - maybe with a –secrets flag - and should also take into consideration environments. I conjured up thi…

mumoshu avatar
mumoshu

And the upcoming Release Template feature https://github.com/roboll/helmfile/pull/439

feat: Release Template by mumoshu · Pull Request #439 · roboll/helmfile

This feature is supposed to help advanced use-cases like Conventional Directory Structure explained in several issues like #428. Newly added configuration keys templates, missingFileHandler, and th…

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@Igor Rodionov any opinions?

zadkiel avatar
zadkiel

Hi guys! I finished helm-git refactor to make it more modulable and robust. It’s still pending as a PR, feel free to give an eye and throw your opinion / review: https://github.com/aslafy-z/helm-git/pull/1. Thanks!

Full refactor by aslafy-z · Pull Request #1 · aslafy-z/helm-git

Fully refactored Change syntax to: git+[repo]@[ref]/[path] Accepts direct path to Chart (with Chart.yaml) Fixed lot of bugs Still fully POSIX sh compliant Add tests Setup CI

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Added a comment

mumoshu avatar
mumoshu

Awesome work! Just added comments as well.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Thanks @mumoshu - good point

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
roboll/helmfile

Deploy Kubernetes Helm Charts. Contribute to roboll/helmfile development by creating an account on GitHub.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@Igor Rodionov @joshmyers @Andriy Knysh (Cloud Posse)

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

layering is supported

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

super!

2019-01-22

zadkiel avatar
zadkiel

Still working on helm-git , switching from ‘@’ to ‘//’ broke helm fetch repo/chart calls. Had to revert

zadkiel avatar
zadkiel

I’m still blocked to deploy cert-manager. I need to deploy it’s CRDs before deploying it, and apply configured CRDs resources after all.

zadkiel avatar
zadkiel

One way simple to do that would be to accept concurrency field within helmfile.yaml so I could have a helmfile dedicated to cert-manager and apply my resources one by one

zadkiel avatar
zadkiel
No dependencies possible · Issue #382 · roboll/helmfile

repositories: - name: coreos url: https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/ releases: - name: prometheus-operator namespace: monitoring chart: coreos/prometheus-operator values: - pr…

mumoshu avatar
mumoshu

makes sense.

but a better way would be to use sub-helmfiles for ordering?

No dependencies possible · Issue #382 · roboll/helmfile

repositories: - name: coreos url: https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/ releases: - name: prometheus-operator namespace: monitoring chart: coreos/prometheus-operator values: - pr…

mumoshu avatar
mumoshu
yaml
helmfiles:
- cert-manager.yaml
- apps.yaml

then helmfile apply runs basically helmfile -f cert-manager.yaml apply followed by helmfile -f apps.yaml apply

zadkiel avatar
zadkiel

I’m looking for a tool that takes a yaml k8s resources file and convert it into a compatible value file for incubator/raw. Any idea?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Haven’t seen a tool for that

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

However, have you seen yq?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
cloudposse/packages

Cloud Posse installer and distribution of native apps, binaries and alpine packages - cloudposse/packages

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Since you’re a total scripting ninja, you could probably munge the YAML with this tool

2019-01-23

mumoshu avatar
mumoshu

anyone uses requirements.yaml and requirements.lock with helmfile? welcoming your opinion on https://github.com/roboll/helmfile/issues/415#issuecomment-457097079

Helmfile should run `dependency build` and not `update` · Issue #415 · roboll/helmfile

I think that helm dependency update is meant to be used to explicitly update the lockfile, while helm dependency build is meant to be used to get your charts directory in a state coherent with the …

2019-01-24

mumoshu avatar
mumoshu

interested in adding a helm-tiller integration to helmfile? come to leave your comment! https://github.com/roboll/helmfile/issues/449

feat: helm tiller integration · Issue #449 · roboll/helmfile

Proposal: helm tiller plugin integration Motivation Provide a clean solution to run tillerless kubernetes using helmfile. See #381 Problems Using helm tiller with helmfile requires separate setup o…

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Ohhhhh that’s a neat idea!

coreygale avatar
coreygale
04:21:10 AM

@coreygale has joined the channel

2019-01-27

aqua avatar
aqua
08:40:03 AM

@aqua has joined the channel

2019-01-30

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Thanks @Shane

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

We’ve wanted to do this. As a stop-gap, we’re using a namespace label in all of our releases.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
cloudposse/helmfiles

Comprehensive Distribution of Helmfiles. Works with helmfile.d - cloudposse/helmfiles

1
    keyboard_arrow_up