#helmfile (2019-01)

https://github.com/roboll/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-30

Erik Osterman avatar
Erik Osterman

Thanks @Shane

Erik Osterman avatar
Erik Osterman

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

Erik Osterman avatar
Erik Osterman
cloudposse/helmfiles

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

:--1:1

2019-01-27

aqua avatar
aqua
08:40:03 AM

@aqua has joined the channel

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 avatar
Erik Osterman

Ohhhhh that’s a neat idea!

coreygale avatar
coreygale
04:21:10 AM

@coreygale has joined the channel

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-22

zadkiel.aharonian avatar
zadkiel.aharonian

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

zadkiel.aharonian avatar
zadkiel.aharonian

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.aharonian avatar
zadkiel.aharonian

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.aharonian avatar
zadkiel.aharonian
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.aharonian avatar
zadkiel.aharonian

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 avatar
Erik Osterman

Haven’t seen a tool for that

Erik Osterman avatar
Erik Osterman

However, have you seen yq?

Erik Osterman avatar
Erik Osterman
cloudposse/packages

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

Erik Osterman avatar
Erik Osterman

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

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 avatar
Erik Osterman

@Igor Rodionov any opinions?

zadkiel.aharonian avatar
zadkiel.aharonian

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 avatar
Erik Osterman

Added a comment

mumoshu avatar
mumoshu

Awesome work! Just added comments as well.

Erik Osterman avatar
Erik Osterman

Thanks @mumoshu - good point

Erik Osterman avatar
Erik Osterman
roboll/helmfile

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

Erik Osterman avatar
Erik Osterman

@Igor Rodionov @joshmyers @aknysh

Erik Osterman avatar
Erik Osterman

layering is supported

aknysh avatar
aknysh

super!

2019-01-20

mumoshu avatar
mumoshu

@zadkiel.aharonian 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-19

zadkiel.aharonian avatar
zadkiel.aharonian

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

2019-01-18

zadkiel.aharonian avatar
zadkiel.aharonian

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 avatar
Erik Osterman


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

Erik Osterman avatar
Erik Osterman

my preference is consistency

Erik Osterman avatar
Erik Osterman

with helm, we get a history of releases/changes

Erik Osterman avatar
Erik Osterman

we treat it like an OS package manager

Erik Osterman avatar
Erik Osterman

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

2019-01-17

zadkiel.aharonian avatar
zadkiel.aharonian

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

zadkiel.aharonian avatar
zadkiel.aharonian

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

zadkiel.aharonian avatar
zadkiel.aharonian
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.aharonian avatar
zadkiel.aharonian

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 avatar
Erik Osterman

What is the error you are getting now?

zadkiel.aharonian avatar
zadkiel.aharonian

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.aharonian avatar
zadkiel.aharonian

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.aharonian avatar
zadkiel.aharonian

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

zadkiel.aharonian avatar
zadkiel.aharonian

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

zadkiel.aharonian avatar
zadkiel.aharonian

@Erik Osterman any clue?

Erik Osterman avatar
Erik Osterman

(we are not using hooks yet…)

Erik Osterman avatar
Erik Osterman

but i like what you’re trying to do

Erik Osterman avatar
Erik Osterman

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

Erik Osterman avatar
Erik Osterman

@Igor Rodionov

Igor Rodionov avatar
Igor Rodionov

I saw helmfile hooks just today

Erik Osterman avatar
Erik Osterman

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

Erik Osterman avatar
Erik Osterman
helm/charts

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

Erik Osterman avatar
Erik Osterman
cloudposse/charts

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

Erik Osterman avatar
Erik Osterman

We can deploy nearly any service without writing a helm chart

2019-01-16

Erik Osterman avatar
Erik Osterman

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 avatar
Erik Osterman

@Igor Rodionov

Erik Osterman avatar
Erik Osterman

@Daren

Daren avatar
Daren

Nice, looks like a better implementation.

Erik Osterman avatar
Erik Osterman

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&#39;ve written a helmfile containing abut 40 releases and I&#39;m having to repeat myself a lot: Example: - name: heapster namespace: kube-system chart: stable/heapster version: 0.3.2 values: - &…

Erik Osterman avatar
Erik Osterman

Not something that immediately jumps out at me.

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

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

Erik Osterman avatar
Erik Osterman

@Igor Rodionov @alebabai @joshmyers @aknysh 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: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 &quot;as is&quot;. It would be nice to have tpl alternative here. Maybe you can: render files …

Erik Osterman avatar
Erik Osterman

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 &quot;as is&quot;. It would be nice to have tpl alternative here. Maybe you can: render files …

Erik Osterman avatar
Erik Osterman

however… I think @alebabai has wanted it

mumoshu avatar
mumoshu

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

zadkiel.aharonian avatar
zadkiel.aharonian
07:36:46 AM

@zadkiel.aharonian has joined the channel

2019-01-08

daveyu avatar
daveyu
09:53:13 PM

@daveyu has joined the channel

daveyu avatar
daveyu

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 avatar
Erik Osterman

I think there was a recent bug with this

Erik Osterman avatar
Erik Osterman

@aknysh was that fixed?

Erik Osterman avatar
Erik Osterman

@Igor Rodionov

Erik Osterman avatar
Erik Osterman

(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 avatar
Erik Osterman
[monochart] Add `container.command` by aknysh · Pull Request #185 · cloudposse/charts

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

aknysh avatar
aknysh

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

Erik Osterman avatar
Erik Osterman

looks like we only support args as a string

Erik Osterman avatar
Erik Osterman
cloudposse/charts

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

Erik Osterman avatar
Erik Osterman

are you running the latest release?

Erik Osterman avatar
Erik Osterman

0.9.0

aknysh avatar
aknysh

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
daveyu

this is with 0.8.0

aknysh avatar
aknysh

update to 0.9.0 and test with yaml

daveyu avatar
daveyu

will do. thanks

daveyu avatar
daveyu

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

Erik Osterman avatar
Erik Osterman

sec

Erik Osterman avatar
Erik Osterman

My guess is this should look something like

Erik Osterman avatar
Erik Osterman
args:
{{ toYaml .Values.deployment.pod.args | indent 10 }}
Erik Osterman avatar
Erik Osterman

basically, put it on a new line

    keyboard_arrow_up