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.

50 lines
1.3 KiB

6 years ago
6 years ago
6 years ago
5 years ago
6 years ago
5 years ago
6 years ago
5 years ago
6 years ago
6 years ago
5 years ago
6 years ago
  1. {{- if .Values.ingress.enabled -}}
  2. {{- $ingressPath := include "pathBase" . -}}
  3. {{- $serviceName := $.Values.app.svc.spa -}}
  4. apiVersion: networking.k8s.io/v1
  5. kind: Ingress
  6. metadata:
  7. name: {{ template "webspa.fullname" . }}
  8. labels:
  9. app: {{ template "webspa.name" . }}
  10. chart: {{ template "webspa.chart" . }}
  11. release: {{ .Release.Name }}
  12. heritage: {{ .Release.Service }}
  13. {{- with .Values.ingress.annotations }}
  14. annotations:
  15. {{ toYaml . | indent 4 }}
  16. {{- end }}
  17. {{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }}
  18. cert-manager.io/issuer: {{ .Values.inf.tls.issuer }}
  19. {{- end }}
  20. {{- if .Values.inf.mesh.enabled }}
  21. {{- with .Values.ingress.mesh.annotations }}
  22. {{ toYaml . | indent 4 }}
  23. {{- end }}
  24. {{- end }}
  25. spec:
  26. {{- if .Values.ingress.tls }}
  27. tls:
  28. {{- range .Values.ingress.tls }}
  29. - hosts:
  30. {{- range .hosts }}
  31. - {{ . }}
  32. {{- end }}
  33. secretName: {{ .secretName }}
  34. {{- end }}
  35. {{- end }}
  36. rules:
  37. {{- range .Values.ingress.hosts }}
  38. - host: {{ . }}
  39. http:
  40. paths:
  41. - path: {{ $ingressPath }}
  42. pathType: Prefix
  43. backend:
  44. service:
  45. name: {{ $serviceName }}
  46. port:
  47. number: 80
  48. {{- end }}
  49. {{- end }}