Repository navigation
Avoid rendering null-valued fields in chart templates - #1360
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Installing ace-installer failed with:
Several templates emit a key whose entire body is conditional, so it renders as
key: nullwhen the condition is false. CRD schema validation rejects that.acespec.valuesFromspec.endpointsmonitoring.agent=prometheus.io/operator(guard read undefined.Values.monitoring.operator; same guard also hid builtin-agent Service annotations)spec.rulesgateway.enabled=truewith emptygateway.hosts(default[])spec.monitor.prometheus.exporterpaths/ HTTPRouterulesforace-hostedVerified with
helm template: the failing cases above no longer render nulls, and the normal cases render the same output as before.