helmfile: helmfile `jsonPatches` does not work with packaged (e.g. tgz) charts

Operating system

MacOS Monterey 12.4

Helmfile Version

v0.145.3

Helm Version

v3.9.3

Bug description

helmfile jsonPatches does not work with packaged (e.g. tgz) charts.

This failure occurs for local and remote charts, but the error returned is different (see below).

It does not fail if the chart is extracted to a directory or is in a helm repository.

The errors appear to be from chartify.

Detailed reproduction steps and --debug output can be found in: https://gist.github.com/seanorama/7640609952b6999b23b761678d226784

Example helmfile.yaml

Using local packaged chart:

releases:
- name: test
  namespace: test
  chart: ./datadog-2.37.4.tgz
  jsonPatches:
    - target:
        kind: ServiceAccount
        name: test-datadog
      patch:
        - op: add
          path: /metadata/annotations
          value:
            foo: bar

Using remote packaged chart:

releases:
- name: test
  namespace: test
  chart: https://github.com/DataDog/helm-charts/releases/download/datadog-2.37.4/datadog-2.37.4.tgz
  jsonPatches:
    - target:
        kind: ServiceAccount
        name: test-datadog
      patch:
        - op: add
          path: /metadata/annotations
          value:
            foo: bar

Error message you’ve seen (if any)

Detailed --debug error messages are in: https://gist.github.com/seanorama/7640609952b6999b23b761678d226784

Using local packaged chart:

Error: in ./helmfile.yaml: [stat datadog-2.37.4.tgz/kustomization.yaml: not a directory]
in ./helmfile.yaml: [stat datadog-2.37.4.tgz/kustomization.yaml: not a directory]

Using remote packaged chart:

Error: in ./helmfile.yaml: [1 additional files found in temp direcotry. This is very strange]
in ./helmfile.yaml: [1 additional files found in temp direcotry. This is very strange]

Steps to reproduce

https://gist.github.com/seanorama/7640609952b6999b23b761678d226784

Working Helmfile Version

n/a

Relevant discussion

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (11 by maintainers)

Commits related to this issue

Most upvoted comments

@mumoshu just do it. Thanks very much.

Thanks! I’ll write up an issue to announce the potential move in the chartify repo.

BTW, https://github.com/variantdev/chartify/releases/tag/v0.11.0 includes the fix for this issue.

Bumping for activity. This is a bug. not an enhancement, unless the jsonPatches functionality is not officially a released feature. If it doesn’t work with the large majority of packages, then it’s a bug.