Skip to content

Commit 653e6d7

Browse files
Merge pull request #22 from Intreecom/feat/non-default-backend-ref
feat: non-default backendRef compatibility
2 parents 74cb7cd + 9eea512 commit 653e6d7

2 files changed

Lines changed: 20 additions & 13 deletions

File tree

charts/py-app/templates/httproute.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@ spec:
2727
sectionName: {{ .Values.httproute.httpsListenerName }}
2828
{{- with .Values.httproute.hostnames }}
2929
hostnames: {{ tpl (toYaml .) $ | nindent 4 }}
30-
{{- end -}}
31-
{{ range .Values.httproute.rules }}
30+
{{- end}}
3231
rules:
32+
{{- range .Values.httproute.rules }}
3333
- backendRefs:
34+
{{- if .backendRefs -}}
35+
{{ toYaml .backendRefs | nindent 8 }}
36+
{{- else }}
3437
- name: {{ $fullName }}
3538
port: {{ $svcPort }}
39+
{{- end }}
3640
{{- with .filters }}
3741
filters: {{ toYaml . | nindent 8 }}
3842
{{- end }}

charts/py-app/values.yaml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ ingress:
109109

110110
# HTTPRoute configuration
111111
httproute:
112-
enabled: true
112+
enabled: false
113113

114114
annotations: {}
115115
labels: {}
@@ -125,16 +125,19 @@ httproute:
125125
httpsListenerName: example-com-https
126126
httpListenerName: example-com-http
127127

128-
rules:
129-
- matches: []
130-
# - path:
131-
# type: PathPrefix
132-
# value: /api/someplace
133-
# headers: []
134-
# queryParams: []
135-
filters: []
136-
# - type: ReplacePrefixMatch
137-
# replacePrefixMatch: /api/someotherplace
128+
rules: []
129+
# - backendRefs:
130+
# - name: ""
131+
# port: ""
132+
# matches: []
133+
# # - path:
134+
# # type: PathPrefix
135+
# # value: /api/someplace
136+
# # headers: []
137+
# # queryParams: []
138+
# filters: []
139+
# # - type: ReplacePrefixMatch
140+
# # replacePrefixMatch: /api/someotherplace
138141

139142
resources: {}
140143
# We usually recommend not to specify default resources and to leave this as a conscious

0 commit comments

Comments
 (0)