Skip to content

Commit d025b79

Browse files
committed
camel-case name for extraHttpRoutes in sophora-image-access-service
1 parent b7343a6 commit d025b79

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
{{ $allHTTPRoutes := .Values.extraHTTPRoute -}}
1+
{{ $allHTTPRoutes := .Values.extraHttpRoutes -}}
22
{{ if .Values.httpRoute.enabled -}}
33
{{ $allHTTPRoutes = prepend $allHTTPRoutes .Values.httpRoute -}}
44
{{ end -}}
55
{{ $fullName := include "access-service.fullname" $ -}}
66
{{ $svcPort := $.Values.service.httpPort -}}
7-
{{ range $index, $httproute := $allHTTPRoutes -}}
7+
{{ range $index, $httpRoute := $allHTTPRoutes -}}
88
apiVersion: gateway.networking.k8s.io/v1
99
kind: HTTPRoute
1010
metadata:
1111
name: {{ $fullName }}{{ eq $index 0 | ternary "" (printf "-%d" $index) }}
1212
labels:
1313
{{- include "access-service.labels" $ | nindent 4 }}
14-
{{- with $httproute.annotations }}
14+
{{- with $httpRoute.annotations }}
1515
annotations:
1616
{{- toYaml . | nindent 4 }}
1717
{{- end }}
1818
spec:
19-
{{- with $httproute.parentRefs }}
19+
{{- with $httpRoute.parentRefs }}
2020
parentRefs:
2121
{{- toYaml . | nindent 4 }}
2222
{{- end }}
23-
{{- if $httproute.hostnames }}
23+
{{- if $httpRoute.hostnames }}
2424
hostnames:
25-
{{- range $httproute.hostnames }}
25+
{{- range $httpRoute.hostnames }}
2626
- {{ . | quote }}
2727
{{- end }}
2828
{{- end }}
@@ -32,7 +32,7 @@ spec:
3232
port: {{ $svcPort }}
3333
matches:
3434
- path:
35-
type: {{ $httproute.pathMatchType | default "PathPrefix" }}
36-
value: {{ $httproute.pathValue | default "/" }}
35+
type: {{ $httpRoute.pathMatchType | default "PathPrefix" }}
36+
value: {{ $httpRoute.pathValue | default "/" }}
3737
---
3838
{{ end }}

charts/sophora-image-access-service/test-values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ httpRoute:
5454
hostnames:
5555
- "image-access.test.example.com"
5656

57-
extraHTTPRoute:
57+
extraHttpRoutes:
5858
- parentRefs:
5959
- name: test-gateway-2
6060
namespace: gateway-system

charts/sophora-image-access-service/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ httpRoute:
8787
pathValue: /
8888
annotations: {}
8989

90-
extraHTTPRoute: []
90+
extraHttpRoutes: []
9191
#- parentRefs:
9292
# - name: my-gateway
9393
# hostnames:

0 commit comments

Comments
 (0)