ingress.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. {{- if .Values.gateway.ingress.enabled }}
  2. apiVersion: networking.k8s.io/v1
  3. kind: Ingress
  4. metadata:
  5. name: {{ include "shop-recycle.fullname" . }}-gateway
  6. labels:
  7. app: {{ include "shop-recycle.fullname" . }}-gateway
  8. {{- include "shop-recycle.labels" . | nindent 4 }}
  9. namespace: {{ .Release.Namespace }}
  10. {{- with .Values.gateway.ingress.annotations }}
  11. annotations:
  12. {{- toYaml . | nindent 4 }}
  13. {{- end }}
  14. spec:
  15. {{- if .Values.gateway.ingress.className }}
  16. ingressClassName: {{ .Values.gateway.ingress.className }}
  17. {{- end }}
  18. {{- with .Values.gateway.ingress.tls }}
  19. tls:
  20. {{- toYaml . | nindent 4 }}
  21. {{- end }}
  22. rules:
  23. {{- range .Values.gateway.ingress.hosts }}
  24. - host: {{ .host | quote }}
  25. http:
  26. paths:
  27. {{- range .paths }}
  28. - path: {{ .path }}
  29. pathType: {{ .pathType }}
  30. backend:
  31. service:
  32. name: {{ include "shop-recycle.fullname" . }}-gateway
  33. port:
  34. number: {{ $.Values.gateway.service.port }}
  35. {{- end }}
  36. {{- end }}
  37. {{- end }}