You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.2 KiB

  1. {{- if .Values.filer.ingress.enabled }}
  2. {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
  3. apiVersion: networking.k8s.io/v1
  4. {{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
  5. apiVersion: networking.k8s.io/v1beta1
  6. {{- else }}
  7. apiVersion: extensions/v1beta1
  8. {{- end }}
  9. kind: Ingress
  10. metadata:
  11. name: ingress-{{ template "seaweedfs.name" . }}-filer
  12. namespace: {{ .Release.Namespace }}
  13. annotations:
  14. {{ omit .Values.filer.ingress.annotations "kubernetes.io/ingress.class" | toYaml | nindent 4 }}
  15. spec:
  16. ingressClassName: {{ .Values.filer.ingress.className | quote }}
  17. rules:
  18. - http:
  19. paths:
  20. - path: /sw-filer/?(.*)
  21. pathType: ImplementationSpecific
  22. backend:
  23. {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
  24. service:
  25. name: {{ template "seaweedfs.name" . }}-filer
  26. port:
  27. number: {{ .Values.filer.port }}
  28. #name:
  29. {{- else }}
  30. serviceName: {{ template "seaweedfs.name" . }}-filer
  31. servicePort: {{ .Values.filer.port }}
  32. {{- end }}
  33. {{- end }}
  34. ---
  35. {{- if .Values.master.ingress.enabled }}
  36. {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
  37. apiVersion: networking.k8s.io/v1
  38. {{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
  39. apiVersion: networking.k8s.io/v1beta1
  40. {{- else }}
  41. apiVersion: extensions/v1beta1
  42. {{- end }}
  43. kind: Ingress
  44. metadata:
  45. name: ingress-{{ template "seaweedfs.name" . }}-master
  46. namespace: {{ .Release.Namespace }}
  47. annotations:
  48. {{ omit .Values.master.ingress.annotations "kubernetes.io/ingress.class" | toYaml | nindent 4 }}
  49. spec:
  50. ingressClassName: {{ .Values.master.ingress.className | quote }}
  51. rules:
  52. - http:
  53. paths:
  54. - path: /sw-master/?(.*)
  55. pathType: ImplementationSpecific
  56. backend:
  57. {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
  58. service:
  59. name: {{ template "seaweedfs.name" . }}-master
  60. port:
  61. number: {{ .Values.master.port }}
  62. #name:
  63. {{- else }}
  64. serviceName: {{ template "seaweedfs.name" . }}-master
  65. servicePort: {{ .Values.master.port }}
  66. {{- end }}
  67. {{- end }}