ingress-backend.yaml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {{- if .Values.ingressBackend.enabled -}}
  2. apiVersion: networking.k8s.io/v1
  3. kind: Ingress
  4. metadata:
  5. name: {{ include "chart.fullname" . }}-backend
  6. labels:
  7. {{- include "chart.labels" . | nindent 4 }}
  8. {{- with .Values.ingressBackend.annotations }}
  9. annotations:
  10. {{- toYaml . | nindent 4 }}
  11. {{- end }}
  12. spec:
  13. {{- with .Values.ingressBackend.className }}
  14. ingressClassName: {{ . }}
  15. {{- end }}
  16. {{- if .Values.ingressBackend.tls }}
  17. tls:
  18. {{- range .Values.ingressBackend.tls }}
  19. - hosts:
  20. {{- range .hosts }}
  21. - {{ . | quote }}
  22. {{- end }}
  23. secretName: {{ .secretName }}
  24. {{- end }}
  25. {{- end }}
  26. rules:
  27. {{- range .Values.ingressBackend.hosts }}
  28. -
  29. {{- with .host }}
  30. host: {{ . | quote }}
  31. {{- end }}
  32. http:
  33. paths:
  34. {{- range .paths }}
  35. - path: {{ .path }}
  36. {{- with .pathType }}
  37. pathType: {{ . }}
  38. {{- end }}
  39. backend:
  40. service:
  41. name: {{ include "chart.componentFullname" (dict "root" $ "name" .component) }}
  42. port:
  43. number: {{ index $.Values.components .component "service" "port" }}
  44. {{- end }}
  45. {{- end }}
  46. {{- end }}