webserver-service.yaml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing,
  12. # software distributed under the License is distributed on an
  13. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. # KIND, either express or implied. See the License for the
  15. # specific language governing permissions and limitations
  16. # under the License.
  17. ################################
  18. ## Airflow Webserver Service
  19. #################################
  20. kind: Service
  21. apiVersion: v1
  22. metadata:
  23. name: {{ .Release.Name }}-webserver
  24. labels:
  25. tier: airflow
  26. component: webserver
  27. release: {{ .Release.Name }}
  28. chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
  29. heritage: {{ .Release.Service }}
  30. {{- with .Values.labels }}
  31. {{ toYaml . | indent 4 }}
  32. {{- end }}
  33. {{- with .Values.webserver.service.annotations }}
  34. annotations:
  35. {{- toYaml . | nindent 4 }}
  36. {{- end }}
  37. spec:
  38. type: {{ .Values.webserver.service.type }}
  39. selector:
  40. tier: airflow
  41. component: webserver
  42. release: {{ .Release.Name }}
  43. ports:
  44. {{ range .Values.webserver.service.ports }}
  45. -
  46. {{- range $key, $val := . }}
  47. {{ $key }}: {{ tpl (toString $val) $ }}
  48. {{- end }}
  49. {{- end }}
  50. {{- if .Values.webserver.service.loadBalancerIP }}
  51. loadBalancerIP: {{ .Values.webserver.service.loadBalancerIP }}
  52. {{- end }}
  53. {{- if .Values.webserver.service.loadBalancerSourceRanges }}
  54. loadBalancerSourceRanges:
  55. {{- toYaml .Values.webserver.service.loadBalancerSourceRanges | nindent 4 }}
  56. {{- end }}