Fix global_rules section to be conditionally included
All checks were successful
Helm Chart Build / lint-only (push) Has been skipped
Helm Chart Build / build-helm (push) Successful in 8s
Build and Deploy / build-api (push) Successful in 40s
Build and Deploy / build-web (push) Successful in 1m6s

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 <noreply@anthropic.com>
This commit is contained in:
d.viti
2025-10-08 19:36:10 +02:00
parent 10b3c2a480
commit 29ef0c65e5

View File

@@ -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 }}