mirror of
https://github.com/nextcloud/all-in-one.git
synced 2024-12-28 09:40:47 +08:00
helm-chart: simplify logic around image for initcontainers
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
6a383ef27a
commit
e74f52aaeb
9 changed files with 0 additions and 71 deletions
|
@ -25,11 +25,7 @@ spec:
|
|||
spec:
|
||||
initContainers:
|
||||
- name: init-volumes
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- chmod
|
||||
- "777"
|
||||
|
|
|
@ -26,11 +26,7 @@ spec:
|
|||
spec:
|
||||
initContainers:
|
||||
- name: init-subpath
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- mkdir
|
||||
- "-p"
|
||||
|
@ -40,11 +36,7 @@ spec:
|
|||
- name: nextcloud-aio-clamav
|
||||
mountPath: /nextcloud-aio-clamav
|
||||
- name: init-volumes
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- chown
|
||||
- 100:100
|
||||
|
|
|
@ -25,11 +25,7 @@ spec:
|
|||
spec:
|
||||
initContainers:
|
||||
- name: init-subpath
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- mkdir
|
||||
- "-p"
|
||||
|
@ -42,11 +38,7 @@ spec:
|
|||
- name: nextcloud-aio-database
|
||||
mountPath: /nextcloud-aio-database
|
||||
- name: init-volumes
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- chown
|
||||
- 999:999
|
||||
|
|
|
@ -26,11 +26,7 @@ spec:
|
|||
spec:
|
||||
initContainers:
|
||||
- name: init-volumes
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- chmod
|
||||
- "777"
|
||||
|
|
|
@ -25,11 +25,7 @@ spec:
|
|||
spec:
|
||||
initContainers:
|
||||
- name: "delete-lost-found"
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- rm
|
||||
- "-rf"
|
||||
|
@ -40,11 +36,7 @@ spec:
|
|||
- name: nextcloud-aio-nextcloud
|
||||
mountPath: /nextcloud-aio-nextcloud
|
||||
- name: init-volumes
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- chmod
|
||||
- "777"
|
||||
|
|
|
@ -25,11 +25,7 @@ spec:
|
|||
spec:
|
||||
initContainers:
|
||||
- name: init-volumes
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- chmod
|
||||
- "777"
|
||||
|
|
|
@ -26,11 +26,7 @@ spec:
|
|||
spec:
|
||||
initContainers:
|
||||
- name: init-volumes
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- chmod
|
||||
- "777"
|
||||
|
|
|
@ -25,11 +25,7 @@ spec:
|
|||
spec:
|
||||
initContainers:
|
||||
- name: init-volumes
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- chmod
|
||||
- "777"
|
||||
|
|
|
@ -59,11 +59,7 @@ find ./ -name '*networkpolicy.yaml' -exec sed -i "s|manual-install-nextcloud-aio
|
|||
cat << EOL > /tmp/initcontainers
|
||||
initContainers:
|
||||
- name: init-volumes
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- chmod
|
||||
- "777"
|
||||
|
@ -72,22 +68,14 @@ EOL
|
|||
cat << EOL > /tmp/initcontainers.database
|
||||
initContainers:
|
||||
- name: init-subpath
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- mkdir
|
||||
- "-p"
|
||||
- /nextcloud-aio-database/data
|
||||
volumeMountsInitContainer:
|
||||
- name: init-volumes
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- chown
|
||||
- 999:999
|
||||
|
@ -97,22 +85,14 @@ EOL
|
|||
cat << EOL > /tmp/initcontainers.clamav
|
||||
initContainers:
|
||||
- name: init-subpath
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- mkdir
|
||||
- "-p"
|
||||
- /nextcloud-aio-clamav/data
|
||||
volumeMountsInitContainer:
|
||||
- name: init-volumes
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- chown
|
||||
- 100:100
|
||||
|
@ -122,10 +102,7 @@ EOL
|
|||
cat << EOL > /tmp/initcontainers.nextcloud
|
||||
initContainers:
|
||||
- name: "delete-lost-found"
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- rm
|
||||
|
@ -133,11 +110,7 @@ cat << EOL > /tmp/initcontainers.nextcloud
|
|||
- "/nextcloud-aio-nextcloud/lost+found"
|
||||
volumeMountsInitRmLostFound:
|
||||
- name: init-volumes
|
||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||
{{- else }}
|
||||
image: alpine
|
||||
{{- end }}
|
||||
command:
|
||||
- chmod
|
||||
- "777"
|
||||
|
|
Loading…
Reference in a new issue