|
| 1 | +{{/* |
| 2 | + Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + or more contributor license agreements. See the NOTICE file |
| 4 | + distributed with this work for additional information |
| 5 | + regarding copyright ownership. The ASF licenses this file |
| 6 | + to you under the Apache License, Version 2.0 (the |
| 7 | + "License"); you may not use this file except in compliance |
| 8 | + with the License. You may obtain a copy of the License at |
| 9 | + |
| 10 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + |
| 12 | + Unless required by applicable law or agreed to in writing, |
| 13 | + software distributed under the License is distributed on an |
| 14 | + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + KIND, either express or implied. See the License for the |
| 16 | + specific language governing permissions and limitations |
| 17 | + under the License. |
| 18 | +*/}} |
| 19 | + |
| 20 | +################################## |
| 21 | +## Airflow API Server HTTPRoute |
| 22 | +################################## |
| 23 | +{{- if and .Values.apiServer.enabled .Values.httpRoute.apiServer.enabled }} |
| 24 | +{{- $fullname := include "airflow.fullname" . }} |
| 25 | +apiVersion: gateway.networking.k8s.io/v1 |
| 26 | +kind: HTTPRoute |
| 27 | +metadata: |
| 28 | + name: {{ $fullname }}-api-server-httproute |
| 29 | + labels: |
| 30 | + tier: airflow |
| 31 | + component: airflow-api-server-httproute |
| 32 | + release: {{ .Release.Name }} |
| 33 | + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" |
| 34 | + heritage: {{ .Release.Service }} |
| 35 | + {{- if or .Values.labels .Values.apiServer.labels .Values.httpRoute.apiServer.labels }} |
| 36 | + {{- mustMerge .Values.httpRoute.apiServer.labels .Values.apiServer.labels .Values.labels | toYaml | nindent 4 }} |
| 37 | + {{- end }} |
| 38 | + {{- with .Values.httpRoute.apiServer.annotations }} |
| 39 | + annotations: {{- toYaml . | nindent 4 }} |
| 40 | + {{- end }} |
| 41 | +spec: |
| 42 | + parentRefs: {{- toYaml .Values.httpRoute.apiServer.parentRefs | nindent 4 }} |
| 43 | + {{- with .Values.httpRoute.apiServer.hostnames }} |
| 44 | + hostnames: |
| 45 | + {{- range . }} |
| 46 | + - {{ tpl . $ | quote }} |
| 47 | + {{- end }} |
| 48 | + {{- end }} |
| 49 | + rules: |
| 50 | + {{- if .Values.httpRoute.apiServer.rules }} |
| 51 | + {{- toYaml .Values.httpRoute.apiServer.rules | nindent 4 }} |
| 52 | + {{- else }} |
| 53 | + - matches: |
| 54 | + - path: |
| 55 | + type: {{ .Values.httpRoute.apiServer.pathType }} |
| 56 | + value: {{ .Values.httpRoute.apiServer.path | quote }} |
| 57 | + backendRefs: |
| 58 | + - name: {{ $fullname }}-api-server |
| 59 | + port: {{ .Values.ports.apiServer }} |
| 60 | + {{- end }} |
| 61 | +{{- end }} |
0 commit comments