Fix global_rules section to be conditionally included
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:
@@ -126,15 +126,15 @@ data:
|
|||||||
key: {{ .apiKey }}
|
key: {{ .apiKey }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.api7.plugins.logging.enabled }}
|
||||||
|
|
||||||
# Global Rules
|
# Global Rules
|
||||||
global_rules:
|
global_rules:
|
||||||
{{- if .Values.api7.plugins.logging.enabled }}
|
|
||||||
request-logging:
|
request-logging:
|
||||||
plugins:
|
plugins:
|
||||||
http-logger:
|
http-logger:
|
||||||
uri: {{ .Values.api7.plugins.logging.endpoint }}
|
uri: {{ .Values.api7.plugins.logging.endpoint }}
|
||||||
batch_max_size: {{ .Values.api7.plugins.logging.batchMaxSize | default 1000 }}
|
batch_max_size: {{ .Values.api7.plugins.logging.batchMaxSize | default 1000 }}
|
||||||
inactive_timeout: {{ .Values.api7.plugins.logging.inactiveTimeout | default 5 }}
|
inactive_timeout: {{ .Values.api7.plugins.logging.inactiveTimeout | default 5 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user