From 29ef0c65e595c4a7c4fb75043c23728783b7787c Mon Sep 17 00:00:00 2001 From: "d.viti" Date: Wed, 8 Oct 2025 19:36:10 +0200 Subject: [PATCH] Fix global_rules section to be conditionally included MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made the global_rules section conditional on logging being enabled. Previously, when logging was disabled, global_rules was rendered as an empty object (null), causing a lint error: "Invalid input: expected record, received null at global_rules" Now the entire global_rules section is only included when there are actual rules to add. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- helm/api7ee-demo-k8s/templates/configmap-adc.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/api7ee-demo-k8s/templates/configmap-adc.yaml b/helm/api7ee-demo-k8s/templates/configmap-adc.yaml index a5a7bfc..0158877 100644 --- a/helm/api7ee-demo-k8s/templates/configmap-adc.yaml +++ b/helm/api7ee-demo-k8s/templates/configmap-adc.yaml @@ -126,15 +126,15 @@ data: key: {{ .apiKey }} {{- end }} {{- end }} +{{- if .Values.api7.plugins.logging.enabled }} # Global Rules global_rules: - {{- if .Values.api7.plugins.logging.enabled }} request-logging: plugins: http-logger: uri: {{ .Values.api7.plugins.logging.endpoint }} batch_max_size: {{ .Values.api7.plugins.logging.batchMaxSize | default 1000 }} inactive_timeout: {{ .Values.api7.plugins.logging.inactiveTimeout | default 5 }} - {{- end }} +{{- end }} {{- end }}