fix: use subdirectories to avoid Longhorn lost+found conflict
This commit is contained in:
@@ -45,28 +45,18 @@ spec:
|
|||||||
affinity:
|
affinity:
|
||||||
{{ $aff | indent 8 }}
|
{{ $aff | indent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $tols := include "tline.tolerations" (dict "Values" .Values "schedulingClass" .Values.minio.schedulingClass) }}
|
{{- $tols := include "tline.tolerations" (dict "Values" .Values "schedulingClass" .Values.minio.schedulingClass) }}
|
||||||
{{- if $tols }}
|
{{- if $tols }}
|
||||||
tolerations:
|
tolerations:
|
||||||
{{ $tols | indent 8 }}
|
{{ $tols | indent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
initContainers:
|
|
||||||
- name: cleanup-lost-found
|
|
||||||
image: busybox:1.36
|
|
||||||
command:
|
|
||||||
- sh
|
|
||||||
- -c
|
|
||||||
- rm -rf /data/lost+found || true
|
|
||||||
volumeMounts:
|
|
||||||
- name: data
|
|
||||||
mountPath: /data
|
|
||||||
containers:
|
containers:
|
||||||
- name: minio
|
- name: minio
|
||||||
image: {{ printf "%s:%s" .Values.images.minio.repository .Values.images.minio.tag | quote }}
|
image: {{ printf "%s:%s" .Values.images.minio.repository .Values.images.minio.tag | quote }}
|
||||||
imagePullPolicy: {{ .Values.images.minio.pullPolicy }}
|
imagePullPolicy: {{ .Values.images.minio.pullPolicy }}
|
||||||
args:
|
args:
|
||||||
- server
|
- server
|
||||||
- /data
|
- /data/miniodata
|
||||||
- "--console-address=:{{ .Values.minio.service.consolePort }}"
|
- "--console-address=:{{ .Values.minio.service.consolePort }}"
|
||||||
ports:
|
ports:
|
||||||
- name: s3
|
- name: s3
|
||||||
@@ -101,6 +91,7 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
|
subPath: miniodata
|
||||||
volumeClaimTemplates:
|
volumeClaimTemplates:
|
||||||
- metadata:
|
- metadata:
|
||||||
name: data
|
name: data
|
||||||
|
|||||||
@@ -41,21 +41,11 @@ spec:
|
|||||||
affinity:
|
affinity:
|
||||||
{{ $aff | indent 8 }}
|
{{ $aff | indent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $tols := include "tline.tolerations" (dict "Values" .Values "schedulingClass" .Values.postgres.schedulingClass) }}
|
{{- $tols := include "tline.tolerations" (dict "Values" .Values "schedulingClass" .Values.postgres.schedulingClass) }}
|
||||||
{{- if $tols }}
|
{{- if $tols }}
|
||||||
tolerations:
|
tolerations:
|
||||||
{{ $tols | indent 8 }}
|
{{ $tols | indent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
initContainers:
|
|
||||||
- name: cleanup-lost-found
|
|
||||||
image: busybox:1.36
|
|
||||||
command:
|
|
||||||
- sh
|
|
||||||
- -c
|
|
||||||
- rm -rf /var/lib/postgresql/data/lost+found || true
|
|
||||||
volumeMounts:
|
|
||||||
- name: data
|
|
||||||
mountPath: /var/lib/postgresql/data
|
|
||||||
containers:
|
containers:
|
||||||
- name: postgres
|
- name: postgres
|
||||||
image: {{ printf "%s:%s" .Values.images.postgres.repository .Values.images.postgres.tag | quote }}
|
image: {{ printf "%s:%s" .Values.images.postgres.repository .Values.images.postgres.tag | quote }}
|
||||||
@@ -73,6 +63,8 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "tline.secretName" . }}
|
name: {{ include "tline.secretName" . }}
|
||||||
key: POSTGRES_PASSWORD
|
key: POSTGRES_PASSWORD
|
||||||
|
- name: PGDATA
|
||||||
|
value: /var/lib/postgresql/data/pgdata
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
exec:
|
exec:
|
||||||
command:
|
command:
|
||||||
|
|||||||
Reference in New Issue
Block a user