What broke? What's expected?
The helm/v2-alpha plugin handles prometheus and network-policy inconsistently when they are commented out in kustomization.yaml.
Expected behavior:
Both optional features (prometheus and network-policy) should generate conditional templates with enable/disable values when commented out.
Actual behavior:
-
prometheus (commented out) → generates prometheus.enable: false in values.yaml and a conditional ServiceMonitor template with {{- if .Values.prometheus.enable }}
-
network-policy (commented out) → generates nothing, no value, no conditional template
This inconsistency means users cannot enable network-policy via helm values without modifying the kustomization.yaml and regenerating.
Reproducing this issue
# Initialize project with helm/v2-alpha
kubebuilder init --plugins=helm/v2-alpha --domain example.com --repo github.com/example/test
# Verify both are commented in config/default/kustomization.yaml:
# - ../prometheus
# - ../network-policy
# Generate helm chart
kubebuilder edit --plugins=helm/v2-alpha
# Check values.yaml - prometheus exists, networkPolicy does not
grep -E "prometheus|networkPolicy|network" dist/chart/values.yaml
# Output: prometheus:
# enable: false
# Check templates - monitoring exists, no network-policy
ls dist/chart/templates/
# No extras directory
KubeBuilder (CLI) Version
4.11.1
PROJECT version
3
Plugin versions
- go.kubebuilder.io/v4
- helm.kubebuilder.io/v2-alpha
Other versions
Go version: 1.24
controller-runtime: v0.21.0
Extra Labels
/kind regression
What broke? What's expected?
The
helm/v2-alphaplugin handlesprometheusandnetwork-policyinconsistently when they are commented out inkustomization.yaml.Expected behavior:
Both optional features (prometheus and network-policy) should generate conditional templates with enable/disable values when commented out.
Actual behavior:
prometheus(commented out) → generatesprometheus.enable: falsein values.yaml and a conditionalServiceMonitortemplate with{{- if .Values.prometheus.enable }}network-policy(commented out) → generates nothing, no value, no conditional templateThis inconsistency means users cannot enable network-policy via helm values without modifying the kustomization.yaml and regenerating.
Reproducing this issue
KubeBuilder (CLI) Version
4.11.1
PROJECT version
3
Plugin versions
Other versions
Go version: 1.24
controller-runtime: v0.21.0
Extra Labels
/kind regression