Skip to content

have access to the chart files in hook before applying it  #801

Open
@tonymayflower

Description

@tonymayflower

hello guys,
I'm setting up helmfile for our production at tripadivisor. But I need some help from you for a specific need.
Each of our project have a /tmpl dir containing secrets tmpl and we generate secrets with consul-template. the /tmpl is packaged with the chart and pushed into chrtmuseum repository.
With helmfile, I want to apply a command to apply the command
consule-template to generate secrets values and apply it with other values.
To do that I did with hooks :

releases:
{{ if eq .Environment.Name "staging" }}

  • name: grafana
    chart: chartmuseum/grafana
    version: "0.1.0"
    namespace: grafana
    missingFileHandler: Error
    hooks:
    • events: ["presync"]
      showlogs: true
      command: "consul-template -vault-retry-attempts=1 -log-level=debug -vault-renew-token=false -template grafana/tmpl/secrets.yaml.tmpl:secrets.yaml -once"
      {{ end }}

but it seems the presync doesn't download the chart to have access to it, isn't it? I have a no such file or directory error ...
Do you have an idea of how to manage it?
thank you in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions