Skip to content

Commit 3fa61a5

Browse files
authored
feat(charts): make HTTPRoute backendRefs optional per rule (#216)
1 parent 6819431 commit 3fa61a5

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

charts/lago-front/templates/httproute.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,18 @@ spec:
3838
filters:
3939
{{- toYaml . | nindent 8 }}
4040
{{- end }}
41+
{{- if hasKey . "backendRefs" }}
42+
{{- with .backendRefs }}
43+
backendRefs:
44+
{{- toYaml . | nindent 8 }}
45+
{{- end }}
46+
{{- else }}
4147
backendRefs:
4248
- group: ""
4349
kind: Service
4450
name: {{ $fullName }}
4551
port: {{ $svcPort }}
4652
weight: 1
4753
{{- end }}
54+
{{- end }}
4855
{{- end }}

charts/lago-rails/templates/httproute.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,18 @@ spec:
3838
filters:
3939
{{- toYaml . | nindent 8 }}
4040
{{- end }}
41+
{{- if hasKey . "backendRefs" }}
42+
{{- with .backendRefs }}
43+
backendRefs:
44+
{{- toYaml . | nindent 8 }}
45+
{{- end }}
46+
{{- else }}
4147
backendRefs:
4248
- group: ""
4349
kind: Service
4450
name: {{ $fullName }}
4551
port: {{ $svcPort }}
4652
weight: 1
4753
{{- end }}
54+
{{- end }}
4855
{{- end }}

0 commit comments

Comments
 (0)