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.

41 lines
1.1 KiB

  1. {{- if .Values.ingress.enabled -}}
  2. {{- $fullName := include "mastodon.fullname" . -}}
  3. {{- $svcPort := .Values.service.port -}}
  4. {{- 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: {{ $fullName }}
  12. labels:
  13. {{- include "mastodon.labels" . | nindent 4 }}
  14. {{- with .Values.ingress.annotations }}
  15. annotations:
  16. {{- toYaml . | nindent 4 }}
  17. {{- end }}
  18. spec:
  19. {{- if .Values.ingress.tls }}
  20. tls:
  21. {{- range .Values.ingress.tls }}
  22. - hosts:
  23. {{- range .hosts }}
  24. - {{ . | quote }}
  25. {{- end }}
  26. secretName: {{ .secretName }}
  27. {{- end }}
  28. {{- end }}
  29. rules:
  30. - host: {{ .Values.ingress.hostname | quote }}
  31. http:
  32. paths:
  33. - path: '/'
  34. backend:
  35. serviceName: {{ $fullName }}-web
  36. servicePort: {{ $svcPort }}
  37. - path: '/api/v1/streaming'
  38. backend:
  39. serviceName: {{ $fullName }}-streaming
  40. servicePort: {{ .Values.application.streaming.port }}
  41. {{- end }}