Skip to content

Commit

Permalink
Add additional if statement before the annotations and remove trim
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Lijkendijk committed Jul 17, 2024
1 parent 0c7977b commit 867aa2c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion charts/nginx-gateway-fabric/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ spec:
metadata:
labels:
{{- include "nginx-gateway.selectorLabels" . | nindent 8 }}
{{- if or .Values.nginxGateway.podAnnotations .Values.metrics.enable }}
annotations:
{{- if .Values.nginxGateway.podAnnotations }}
{{- toYaml .Values.nginxGateway.podAnnotations | trim | nindent 8 }}
{{- toYaml .Values.nginxGateway.podAnnotations | nindent 8 }}
{{- end }}
{{- if .Values.metrics.enable }}
prometheus.io/scrape: "true"
Expand All @@ -26,6 +27,7 @@ spec:
prometheus.io/scheme: "https"
{{- end }}
{{- end }}
{{- end }}
spec:
containers:
- args:
Expand Down

0 comments on commit 867aa2c

Please sign in to comment.