fix: add initContainers to clean lost+found from Longhorn PVCs
This commit is contained in:
@@ -13,7 +13,7 @@ spec:
|
|||||||
releaseName: porthole
|
releaseName: porthole
|
||||||
valueFiles:
|
valueFiles:
|
||||||
- values.yaml
|
- values.yaml
|
||||||
- ../../argocd/values-porthole.yaml
|
- values-cluster.yaml
|
||||||
destination:
|
destination:
|
||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
namespace: porthole
|
namespace: porthole
|
||||||
|
|||||||
@@ -45,12 +45,22 @@ 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 }}
|
||||||
containers:
|
initContainers:
|
||||||
|
- name: cleanup-lost-found
|
||||||
|
image: busybox:1.36
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- rm -rf /data/lost+found || true
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /data
|
||||||
|
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 }}
|
||||||
|
|||||||
@@ -41,12 +41,22 @@ 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 }}
|
||||||
containers:
|
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:
|
||||||
- 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 }}
|
||||||
imagePullPolicy: {{ .Values.images.postgres.pullPolicy }}
|
imagePullPolicy: {{ .Values.images.postgres.pullPolicy }}
|
||||||
|
|||||||
Reference in New Issue
Block a user