helm: standardize yaml configuration (#15728)

- move application variables under `mastodon` namespace
- restore standard yaml structure for ingress configuration
- move values.yaml.template to values.yaml
This commit is contained in:
Alex Dunn 2021-02-14 23:00:54 -08:00 committed by GitHub
parent 55a6b54f8e
commit 9c273c2a59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 161 additions and 163 deletions

View file

@ -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 }}