| gio | 20157e8 | 2026-07-22 13:10:48 +0400 | [diff] [blame^] | 1 | {{- 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 }} |
| 14 | apiVersion: {{ .Values.controller.httpRoute.apiVersion }} |
| 15 | kind: {{ .Values.controller.httpRoute.kind }} |
| 16 | metadata: |
| 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 }} |
| 24 | spec: |
| 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 }} |