Summary
A minimal grid-site chart install — using only the two fields required by
values.schema.json (gridNetwork.name, gridSite.name) and leaving every
other gridNetwork.* value at its chart default — is rejected by the
Kubernetes API server:
The GridNetwork "prod-grid" is invalid: spec: Required value
This reproduces identically on main (confirmed via
git archive origin/main -- charts/grid-site rendered against a live Kind
cluster with kubectl create --dry-run=server), so it is not specific to
any in-flight feature branch.
Root cause
charts/grid-site/templates/gridnetwork.yaml gates every single
GridNetwork.spec field behind a Helm {{- with ... }} block:
gridId, region, zone, routingPolicy, scoringPolicy,
metricsRefreshInterval, swim, tls, gatewayRefs. The chart's
values.yaml defaults for all of these are falsy ("", {}, or []), which
Go's text/template with treats as "absent" — so when none of them are
overridden, the rendered spec: has no children at all:
That's YAML null, not an empty object ({}). The GridNetwork CRD's
structural schema requires spec to be present as an object, so the API
server rejects both a fresh helm install and any helm upgrade that lands
on this all-defaults state (e.g. removing the last non-default field, such as
budgetPolicy, from an existing release).
Impact
Any consumer following the chart's own documented minimal usage (set only the
two required name fields) cannot install grid-site today. This was caught
while live-validating grid#47 (tenant-budget plumbing) on a Kind cluster on
helios08 — unsetting budgetPolicy via helm upgrade was the reproduction
path, but the bug pre-dates that PR and affects any all-defaults install.
Fix
Fixed alongside grid#47: gridId is now rendered unconditionally
(gridId: {{ .Values.gridNetwork.gridId | quote }}, defaulting to "",
which is already a valid/expected value per the CRD's own server-side
default) instead of being gated behind with. This guarantees spec always
has at least one key, so it's never null. A helm-unittest regression case
("renders a non-null spec when only the required name fields are set") was
added to charts/grid-site/tests/gridnetwork_test.yaml.
Verified live on a Kind cluster (helios08):
- Before fix:
kubectl create --dry-run=server on the minimal-fields render → spec: Required value.
- After fix: same dry-run →
gridnetwork.grid.praxis-proxy.io/zz-fresh created (server dry run).
helm upgrade removing budgetPolicy from an existing release (previously failed with the same error) now succeeds and status.budgetStatus clears back to empty as expected.
- Full
KIND=1 ./scripts/verify-helm-chart.sh (182 checks) still passes with no regressions.
See #47 for the fix commit.
Summary
A minimal
grid-sitechart install — using only the two fields required byvalues.schema.json(gridNetwork.name,gridSite.name) and leaving everyother
gridNetwork.*value at its chart default — is rejected by theKubernetes API server:
This reproduces identically on
main(confirmed viagit archive origin/main -- charts/grid-siterendered against a live Kindcluster with
kubectl create --dry-run=server), so it is not specific toany in-flight feature branch.
Root cause
charts/grid-site/templates/gridnetwork.yamlgates every singleGridNetwork.specfield behind a Helm{{- with ... }}block:gridId,region,zone,routingPolicy,scoringPolicy,metricsRefreshInterval,swim,tls,gatewayRefs. The chart'svalues.yamldefaults for all of these are falsy ("",{}, or[]), whichGo's
text/templatewithtreats as "absent" — so when none of them areoverridden, the rendered
spec:has no children at all:spec:That's YAML
null, not an empty object ({}). TheGridNetworkCRD'sstructural schema requires
specto be present as an object, so the APIserver rejects both a fresh
helm installand anyhelm upgradethat landson this all-defaults state (e.g. removing the last non-default field, such as
budgetPolicy, from an existing release).Impact
Any consumer following the chart's own documented minimal usage (set only the
two required name fields) cannot install
grid-sitetoday. This was caughtwhile live-validating
grid#47(tenant-budget plumbing) on a Kind cluster onhelios08 — unsetting
budgetPolicyviahelm upgradewas the reproductionpath, but the bug pre-dates that PR and affects any all-defaults install.
Fix
Fixed alongside
grid#47:gridIdis now rendered unconditionally(
gridId: {{ .Values.gridNetwork.gridId | quote }}, defaulting to"",which is already a valid/expected value per the CRD's own server-side
default) instead of being gated behind
with. This guaranteesspecalwayshas at least one key, so it's never null. A
helm-unittestregression case("renders a non-null spec when only the required name fields are set") was
added to
charts/grid-site/tests/gridnetwork_test.yaml.Verified live on a Kind cluster (helios08):
kubectl create --dry-run=serveron the minimal-fields render →spec: Required value.gridnetwork.grid.praxis-proxy.io/zz-fresh created (server dry run).helm upgraderemovingbudgetPolicyfrom an existing release (previously failed with the same error) now succeeds andstatus.budgetStatusclears back to empty as expected.KIND=1 ./scripts/verify-helm-chart.sh(182 checks) still passes with no regressions.See #47 for the fix commit.