Skip to content

Commit a2a2ac9

Browse files
committed
fix(charts): fix template with metrics port enabled
1 parent dd56f74 commit a2a2ac9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

charts/fritzbox-exporter/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
type: application
33
name: fritzbox-exporter
44
description: A Helm chart for fritzbox-exporter
5-
version: 0.0.2
5+
version: 0.0.3
66
appVersion: "1.0"

charts/fritzbox-exporter/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ spec:
3434
{{- if $val.enabled }}
3535
- name: {{ $key | quote }}
3636
containerPort: {{ $val.port }}
37-
protocol: {{ $val.protocol | default "TCP" }}
37+
protocol: {{ default "TCP" $val.protocol | quote }}
3838
{{- end }}
3939
{{- end }}
4040
env:
4141
{{- range $i, $val := .Values.env }}
4242
- name: {{ $val.name | quote }}
4343
value: {{ $val.value | quote }}
4444
{{- end }}
45-
{{- if .Values.ports.metrics.enabled -}}
45+
{{- if and .Values.ports.metrics .Values.ports.metrics.enabled }}
4646
livenessProbe:
4747
httpGet:
4848
path: /metrics

charts/fritzbox-exporter/templates/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
- name: {{ $key | quote }}
2121
port: {{ $val.port }}
2222
targetPort: {{ $key | quote }}
23-
protocol: {{ $val.protocol | default "TCP" }}
23+
protocol: {{ default "TCP" $val.protocol | quote }}
2424
{{- end }}
2525
{{- end }}
2626
selector:

0 commit comments

Comments
 (0)