blob: f2dcfc1fe9ebd0201e50e248c265f2a93b4063c6 [file] [log] [blame]
gio20157e82026-07-22 13:10:48 +04001{{- if .Values.controller.httpRoute.enabled }}
2{{- $root := . }}
3{{- $hostnames := (list) }}
4{{- if .Values.controller.httpRoute.reuseIngressConfiguration }}
5 {{- if .Values.controller.ingress.hostName }}
6 {{- $hostnames = append $hostnames .Values.controller.ingress.hostName }}
7 {{- end }}
8 {{- if .Values.controller.ingress.resourceRootUrl }}
9 {{- $hostnames = append $hostnames .Values.controller.ingress.resourceRootUrl }}
10 {{- end }}
11{{- else }}
12 {{- $hostnames = default (list) .Values.controller.httpRoute.hostnames }}
13{{- end }}
14apiVersion: {{ .Values.controller.httpRoute.apiVersion }}
15kind: {{ .Values.controller.httpRoute.kind }}
16metadata:
17 name: {{ include "jenkins.fullname" . }}
18 labels:
19 {{- include "jenkins.labels" . | nindent 4 }}
20 {{- if .Values.controller.httpRoute.annotations }}
21 annotations:
22 {{- tpl (toYaml .Values.controller.httpRoute.annotations) . | nindent 4 }}
23 {{- end }}
24spec:
25 {{- with .Values.controller.httpRoute.parentRefs }}
26 parentRefs:
27 {{- toYaml . | nindent 4 }}
28 {{- end }}
29 hostnames:
30 {{- range $hostnames }}
31 - {{ . | quote }}
32 {{- end }}
33 rules:
34{{- if .Values.controller.httpRoute.extraRules }}
35{{- toYaml .Values.controller.httpRoute.extraRules | nindent 2 }}
36{{- end }}
37 - backendRefs:
38 - name: {{ include "jenkins.fullname" $root }}
39 port: {{ $root.Values.controller.servicePort }}
40{{- end }}