about summary refs log tree commit diff
path: root/chart/templates/ingress.yaml
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-02-22 19:36:03 +0100
committerGitHub <noreply@github.com>2021-02-22 19:36:03 +0100
commit4aa860b65bd796b09dc0ceffa1fdd7de31060a34 (patch)
tree8850793f3118de3a91e2e224bcec9651e023acd0 /chart/templates/ingress.yaml
parent8792128f38e19b0d7882468a4f1f9362b98793a0 (diff)
parent6ae04d990c50c12e171fc2a3d2593fa42d9c4c9c (diff)
Merge pull request #1501 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'chart/templates/ingress.yaml')
-rw-r--r--chart/templates/ingress.yaml17
1 files changed, 11 insertions, 6 deletions
diff --git a/chart/templates/ingress.yaml b/chart/templates/ingress.yaml
index 947bf5b70..8930d2c10 100644
--- a/chart/templates/ingress.yaml
+++ b/chart/templates/ingress.yaml
@@ -1,6 +1,7 @@
 {{- if .Values.ingress.enabled -}}
 {{- $fullName := include "mastodon.fullname" . -}}
-{{- $svcPort := .Values.service.port -}}
+{{- $webPort := .Values.mastodon.web.port -}}
+{{- $streamingPort := .Values.mastodon.streaming.port -}}
 {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
 apiVersion: networking.k8s.io/v1beta1
 {{- else -}}
@@ -27,15 +28,19 @@ spec:
     {{- end }}
   {{- end }}
   rules:
-    - host: {{ .Values.ingress.hostname | quote }}
+    {{- range .Values.ingress.hosts }}
+    - host: {{ .host | quote }}
       http:
         paths:
-          - path: '/'
+          {{- range .paths }}
+          - path: {{ .path }}
             backend:
               serviceName: {{ $fullName }}-web
-              servicePort: {{ $svcPort }}
-          - path: '/api/v1/streaming'
+              servicePort: {{ $webPort }}
+          - path: {{ .path }}api/v1/streaming
             backend:
               serviceName: {{ $fullName }}-streaming
-              servicePort: {{ .Values.application.streaming.port }}
+              servicePort: {{ $streamingPort }}
+          {{- end }}
+    {{- end }}
 {{- end }}