Skip to content

Avoid rendering null-valued fields in chart templates - #1360

Merged
ArnobKumarSaha merged 2 commits into
masterfrom
arnob-valuesfrom
Oct 5, 2026
Merged

ArnobKumarSaha merged 2 commits into
masterfrom
arnob-valuesfrom

Conversation

@ArnobKumarSaha

Copy link
Copy Markdown
Member

Installing ace-installer failed with:

HelmRelease.helm.toolkit.fluxcd.io "ace" is invalid: spec.valuesFrom in body must be of type array: "null"

Several templates emit a key whose entire body is conditional, so it renders as key: null when the condition is false. CRD schema validation rejects that.

Chart Field Rendered null when
ace-installer (+ certified) HelmRelease ace spec.valuesFrom not OpenShift (default)
service-provider ServiceMonitor spec.endpoints monitoring.agent=prometheus.io/operator (guard read undefined .Values.monitoring.operator; same guard also hid builtin-agent Service annotations)
dns-proxy, gh-ci-webhook, inbox-ui, offline-license-server, rustfs, service-backend, smtprelay HTTPRoute spec.rules gateway.enabled=true with empty gateway.hosts (default [])
ace Postgres/Redis spec.monitor.prometheus.exporter exporter resources empty and not OpenShift
acaas Ingress paths / HTTPRoute rules for ace-hosted no UI backend enabled (default)

Verified with helm template: the failing cases above no longer render nulls, and the normal cases render the same output as before.

Several templates emitted a key whose entire body was conditional,
rendering `key: null` when the condition was false. CRD schema
validation rejects null for list/object fields, e.g.:

  HelmRelease "ace" is invalid: spec.valuesFrom in body must be of type array: "null"

- ace-installer: emit HelmRelease ace valuesFrom only on OpenShift
- service-provider: drop guard on undefined .Values.monitoring.operator
  that left ServiceMonitor endpoints null and skipped builtin annotations
- dns-proxy, gh-ci-webhook, inbox-ui, offline-license-server, rustfs,
  service-backend, smtprelay: emit HTTPRoute rules only when
  gateway.hosts has paths
- ace: emit KubeDB monitor.prometheus.exporter only when it has content
- acaas: skip ace-hosted Ingress/HTTPRoute when no backend is enabled

Signed-off-by: Arnob kumar saha <arnob@appscode.com>
Signed-off-by: Arnob kumar saha <arnob@appscode.com>
@ArnobKumarSaha
ArnobKumarSaha merged commit 27d3a9f into master Oct 5, 2026
7 checks passed
@ArnobKumarSaha
ArnobKumarSaha deleted the arnob-valuesfrom branch October 5, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant