mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 03:25:17 +01:00
helm: fix consistent indentation, chomping, and use of with (#19918)
This commit is contained in:
parent
86f6631d28
commit
302a58c22b
@ -1,4 +1,4 @@
|
||||
{{ if .Values.mastodon.cron.removeMedia.enabled }}
|
||||
{{ if .Values.mastodon.cron.removeMedia.enabled -}}
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
|
@ -5,9 +5,9 @@ metadata:
|
||||
labels:
|
||||
{{- include "mastodon.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "mastodon.selectorLabels" . | nindent 6 }}
|
||||
@ -31,8 +31,10 @@ spec:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "mastodon.serviceAccountName" . }}
|
||||
{{- with .Values.podSecurityContext }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
# ensure we run on the same node as the other rails components; only
|
||||
# required when using PVCs that are ReadWriteOnce
|
||||
@ -95,7 +97,7 @@ spec:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.mastodon.s3.existingSecret }}
|
||||
key: AWS_ACCESS_KEY_ID
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- if .Values.mastodon.smtp.existingSecret }}
|
||||
- name: "SMTP_LOGIN"
|
||||
valueFrom:
|
||||
@ -108,7 +110,7 @@ spec:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.mastodon.smtp.existingSecret }}
|
||||
key: password
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
volumeMounts:
|
||||
- name: assets
|
||||
|
@ -5,9 +5,9 @@ metadata:
|
||||
labels:
|
||||
{{- include "mastodon.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "mastodon.selectorLabels" . | nindent 6 }}
|
||||
@ -29,12 +29,16 @@ spec:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "mastodon.serviceAccountName" . }}
|
||||
{{- with .Values.podSecurityContext }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
{{- with .Values.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
@ -68,8 +72,10 @@ spec:
|
||||
httpGet:
|
||||
path: /api/v1/streaming/health
|
||||
port: streaming
|
||||
{{- with .Values.resources }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
@ -5,9 +5,9 @@ metadata:
|
||||
labels:
|
||||
{{- include "mastodon.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "mastodon.selectorLabels" . | nindent 6 }}
|
||||
@ -31,8 +31,10 @@ spec:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "mastodon.serviceAccountName" . }}
|
||||
{{- with .Values.podSecurityContext }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
volumes:
|
||||
- name: assets
|
||||
@ -44,8 +46,10 @@ spec:
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
{{- with .Values.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
@ -83,7 +87,7 @@ spec:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.mastodon.s3.existingSecret }}
|
||||
key: AWS_ACCESS_KEY_ID
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
volumeMounts:
|
||||
- name: assets
|
||||
@ -108,8 +112,10 @@ spec:
|
||||
port: http
|
||||
failureThreshold: 30
|
||||
periodSeconds: 5
|
||||
{{- with .Values.resources }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{- if .Values.autoscaling.enabled }}
|
||||
{{- if .Values.autoscaling.enabled -}}
|
||||
apiVersion: autoscaling/v2beta1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
|
@ -2,7 +2,7 @@
|
||||
{{- $fullName := include "mastodon.fullname" . -}}
|
||||
{{- $webPort := .Values.mastodon.web.port -}}
|
||||
{{- $streamingPort := .Values.mastodon.streaming.port -}}
|
||||
{{- if or (.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not (.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) }}
|
||||
{{- if or (.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not (.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{- if .Values.elasticsearch.enabled }}
|
||||
{{- if .Values.elasticsearch.enabled -}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{- if .Values.mastodon.createAdmin.enabled }}
|
||||
{{- if .Values.mastodon.createAdmin.enabled -}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
{{- if (not .Values.mastodon.s3.enabled) -}}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
@ -8,7 +8,9 @@ metadata:
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.mastodon.persistence.system.accessMode }}
|
||||
{{- with .Values.mastodon.persistence.assets.resources }}
|
||||
resources:
|
||||
{{- toYaml .Values.mastodon.persistence.assets.resources | nindent 4}}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
storageClassName: {{ .Values.mastodon.persistence.assets.storageClassName }}
|
||||
{{- end }}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
{{- if (not .Values.mastodon.s3.enabled) -}}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
@ -8,7 +8,9 @@ metadata:
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.mastodon.persistence.system.accessMode }}
|
||||
{{- with .Values.mastodon.persistence.system.resources }}
|
||||
resources:
|
||||
{{- toYaml .Values.mastodon.persistence.system.resources | nindent 4}}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
storageClassName: {{ .Values.mastodon.persistence.system.storageClassName }}
|
||||
{{- end }}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{- if (include "mastodon.createSecret" .) }}
|
||||
{{- if (include "mastodon.createSecret" .) -}}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
@ -40,4 +40,4 @@ data:
|
||||
password: "{{ .Values.postgresql.auth.password | b64enc }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
Loading…
Reference in New Issue
Block a user