Skip to content

feat: support helm charts in kustomizations#4582

Open
vincent-onebrief wants to merge 1 commit intozarf-dev:mainfrom
vincent-onebrief:vincent/kustomize-helm-support
Open

feat: support helm charts in kustomizations#4582
vincent-onebrief wants to merge 1 commit intozarf-dev:mainfrom
vincent-onebrief:vincent/kustomize-helm-support

Conversation

@vincent-onebrief
Copy link
Copy Markdown
Contributor

Description

Currently kustomizations with helm chart references fail, even with plugins enabled.

# zarf.yaml
components:
  - name: keycloak-server
    default: true
    manifests:
      - name: keycloak-server
        namespace: keycloak
        kustomizations:
          - .
        enableKustomizePlugins: true
# kustomization.yaml
namespace: keycloak
helmCharts:
  - releaseName: keycloak
    name: keycloak
    repo: oci://registry-1.docker.io/bitnamicharts
    version: "23.3.3"
    valuesFile: values.yaml
$ zarf dev inspect manifests .

2026-02-03 13:54:02 ERR unable to build kustomization .: trouble configuring builtin HelmChartInflationGenerator with config: `
name: keycloak
namespace: keycloak
releaseName: keycloak
repo: oci://registry-1.docker.io/bitnamicharts
valuesFile: values.yaml
version: 26.3.3
`: must specify --enable-helm

This can be worked around with an onCreate action that renders the manifests, but that's kinda jank and breaks zarf dev inspect and zarf dev find-images.

# zarf.yaml
components:
  - name: keycloak-server
    default: true
    actions:
      onCreate:
        before:
          - description: kustomize build
            cmd: kubectl kustomize --enable-helm > generated.yaml
    manifests:
      - name: keycloak-server
        namespace: keycloak
        files:
          - generated.yaml

This PR enables helm inside kustomizations when enableKustomizePlugins is set, and adds tests to validate functionality

Checklist before merging

Signed-off-by: vincent-onebrief <vincent@onebrief.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 3, 2026

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 4a62fc9
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/698245bf70f96400080c2517

@vincent-onebrief vincent-onebrief changed the title feat: support hlem charts in kustomizations feat: support helm charts in kustomizations Feb 3, 2026
@vincent-onebrief
Copy link
Copy Markdown
Contributor Author

vincent-onebrief commented Feb 3, 2026

Added tests fail as expected with build.go changes commented out

@vincent-onebrief vincent-onebrief marked this pull request as ready for review February 3, 2026 19:03
@vincent-onebrief vincent-onebrief requested review from a team as code owners February 3, 2026 19:03
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/internal/packager/kustomize/build.go 78.57% <100.00%> (+78.57%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

if enableKustomizePlugins {
buildOptions.PluginConfig = krustytypes.MakePluginConfig(krustytypes.PluginRestrictionsNone, krustytypes.BploUseStaticallyLinked)
buildOptions.PluginConfig.HelmConfig.Enabled = true
buildOptions.PluginConfig.HelmConfig.Command = "helm"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I half wonder if after #4350 is merged we should update this to use zarf tools helm.

Not a blocker, but a potential follow-up pr.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, #4350 is close but blocked by a bug in Helm that will be fixed in the next Helm release.

I do think we should block this PR on that, the quasi Helm fork currently in Zarf is outdated, and I would like to avoid relying on the host binary, so that package builds are the same across devices

@AustinAbro321
Copy link
Copy Markdown
Member

Marking this as blocked by #4350 which will fully embed Helm into the Zarf binary and should allow this to be done looking for the host binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants