flower-service.yaml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 Flower Service Component
  19. #################################
  20. {{- if .Values.flower.enabled }}
  21. {{- if or (eq .Values.executor "CeleryExecutor") (eq .Values.executor "CeleryKubernetesExecutor") }}
  22. kind: Service
  23. apiVersion: v1
  24. metadata:
  25. name: {{ .Release.Name }}-flower
  26. labels:
  27. tier: airflow
  28. component: flower
  29. release: {{ .Release.Name }}
  30. chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
  31. heritage: {{ .Release.Service }}
  32. {{- with .Values.labels }}
  33. {{ toYaml . | indent 4 }}
  34. {{- end }}
  35. {{- with .Values.flower.service.annotations }}
  36. annotations:
  37. {{- toYaml . | nindent 4 }}
  38. {{- end }}
  39. spec:
  40. type: {{ .Values.flower.service.type }}
  41. selector:
  42. tier: airflow
  43. component: flower
  44. release: {{ .Release.Name }}
  45. ports:
  46. {{ range .Values.flower.service.ports }}
  47. -
  48. {{- range $key, $val := . }}
  49. {{ $key }}: {{ tpl (toString $val) $ }}
  50. {{- end }}
  51. {{- end }}
  52. {{- if .Values.flower.service.loadBalancerIP }}
  53. loadBalancerIP: {{ .Values.flower.service.loadBalancerIP }}
  54. {{- end }}
  55. {{- if .Values.flower.service.loadBalancerSourceRanges }}
  56. loadBalancerSourceRanges:
  57. {{- toYaml .Values.flower.service.loadBalancerSourceRanges | nindent 4 }}
  58. {{- end }}
  59. {{- end }}
  60. {{- end }}