@@ -5,19 +5,53 @@ metadata:
55 name : {{ include "taskchampion-sync-server.fullname" . }}
66 labels :
77 {{- include "taskchampion-sync-server.labels" . | nindent 4 }}
8+ {{- with .Values.httpRoute.annotations }}
9+ annotations :
10+ {{- toYaml . | nindent 4 }}
11+ {{- end }}
812spec :
913 parentRefs :
14+ {{- if .Values.httpRoute.parentRefs }}
15+ {{- range .Values.httpRoute.parentRefs }}
16+ - name : {{ .name }}
17+ {{- if .namespace }}
18+ namespace : {{ .namespace }}
19+ {{- end }}
20+ {{- if .sectionName }}
21+ sectionName : {{ .sectionName }}
22+ {{- end }}
23+ {{- end }}
24+ {{- else if .Values.httpRoute.gateway }}
1025 - name : {{ .Values.httpRoute.gateway }}
11- {{- if .Values.httpRoute.host }}
26+ {{- end }}
27+ {{- $hostnames := .Values.httpRoute.hostnames }}
28+ {{- if and (not $hostnames) .Values.httpRoute.host }}
29+ {{- $hostnames = list .Values.httpRoute.host }}
30+ {{- end }}
31+ {{- if $hostnames }}
1232 hostnames :
13- - {{ .Values.httpRoute.host }}
33+ {{- range $hostnames }}
34+ - {{ . | quote }}
35+ {{- end }}
1436 {{- end }}
1537 rules :
38+ {{- if .Values.httpRoute.rules }}
39+ {{- range .Values.httpRoute.rules }}
40+ - matches :
41+ - path :
42+ type : {{ .path.type | default "PathPrefix" }}
43+ value : {{ .path.value | default "/" }}
44+ backendRefs :
45+ - name : {{ include "taskchampion-sync-server.fullname" $ }}
46+ port : {{ .backendPort | default 8080 }}
47+ {{- end }}
48+ {{- else }}
1649 - matches :
1750 - path :
1851 type : PathPrefix
19- value : {{ .Values.httpRoute.path }}
52+ value : {{ .Values.httpRoute.path | default "/" }}
2053 backendRefs :
2154 - name : {{ include "taskchampion-sync-server.fullname" . }}
22- port : {{ .Values.httpRoute.port }}
55+ port : {{ .Values.httpRoute.port | default 8080 }}
56+ {{- end }}
2357{{- end }}
0 commit comments