Skip to content

"Re-using environment state in sub-helmfiles" kubeContext not working #1213

Description

@wrenix

Operating system

NixOS

Helmfile Version

v0.158.1

Helm Version

v3.13.2

Bug description

configured kubeContext is not used (always default).

In Documentation describted "Re-using environment state in sub-helmfiles", which i found here:

Advanced Features > Best Practices Guide > Re-using environment state in sub-helmfiles

https://helmfile.readthedocs.io/en/stable/writing-helmfile/#re-using-environment-state-in-sub-helmfiles

Does not work:

Example helmfile.yaml

helmfile.yaml

environments:
  stage:
    kubeContext: stage
    values:
    - env/stage.yaml
  prod:
    kubeContext: prod
    values:
    - env/prod.yaml

---

helmfiles:
  - path: sub-helmfile.yaml
    values:
      - {{ toYaml .Values | nindent 6 }}

sub-helmfile.yaml

releases:
  - name: "a"
    chart: "a/a"
    installed: {{ .Values.enabled }}

env/prod.yaml

enabled: true

env/stage.yaml

enabled: false

Error message you've seen (if any)

Steps to reproduce

helmfile -e prod list

Working Helmfile Version

maybe never, see #948 and not working #947

Relevant discussion

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions