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.

46 lines
1.2 KiB

  1. {{- if .Values.ingress.enabled -}}
  2. {{- $ingressPath := include "pathBase" . -}}
  3. {{- $serviceName := .Values.app.svc.mvc -}}
  4. apiVersion: extensions/v1beta1
  5. kind: Ingress
  6. metadata:
  7. name: {{ template "webmvc.fullname" . }}
  8. labels:
  9. app: {{ template "webmvc.name" . }}
  10. chart: {{ template "webmvc.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. backend:
  43. serviceName: {{ $serviceName }}
  44. servicePort: http
  45. {{- end }}
  46. {{- end }}