mirror of
https://github.com/nextcloud/all-in-one.git
synced 2024-12-29 02:00:45 +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:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init-volumes
|
- name: init-volumes
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- chmod
|
- chmod
|
||||||
- "777"
|
- "777"
|
||||||
|
|
|
@ -26,11 +26,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init-subpath
|
- name: init-subpath
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- mkdir
|
- mkdir
|
||||||
- "-p"
|
- "-p"
|
||||||
|
@ -40,11 +36,7 @@ spec:
|
||||||
- name: nextcloud-aio-clamav
|
- name: nextcloud-aio-clamav
|
||||||
mountPath: /nextcloud-aio-clamav
|
mountPath: /nextcloud-aio-clamav
|
||||||
- name: init-volumes
|
- name: init-volumes
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- chown
|
- chown
|
||||||
- 100:100
|
- 100:100
|
||||||
|
|
|
@ -25,11 +25,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init-subpath
|
- name: init-subpath
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- mkdir
|
- mkdir
|
||||||
- "-p"
|
- "-p"
|
||||||
|
@ -42,11 +38,7 @@ spec:
|
||||||
- name: nextcloud-aio-database
|
- name: nextcloud-aio-database
|
||||||
mountPath: /nextcloud-aio-database
|
mountPath: /nextcloud-aio-database
|
||||||
- name: init-volumes
|
- name: init-volumes
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- chown
|
- chown
|
||||||
- 999:999
|
- 999:999
|
||||||
|
|
|
@ -26,11 +26,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init-volumes
|
- name: init-volumes
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- chmod
|
- chmod
|
||||||
- "777"
|
- "777"
|
||||||
|
|
|
@ -25,11 +25,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: "delete-lost-found"
|
- name: "delete-lost-found"
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- rm
|
- rm
|
||||||
- "-rf"
|
- "-rf"
|
||||||
|
@ -40,11 +36,7 @@ spec:
|
||||||
- name: nextcloud-aio-nextcloud
|
- name: nextcloud-aio-nextcloud
|
||||||
mountPath: /nextcloud-aio-nextcloud
|
mountPath: /nextcloud-aio-nextcloud
|
||||||
- name: init-volumes
|
- name: init-volumes
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- chmod
|
- chmod
|
||||||
- "777"
|
- "777"
|
||||||
|
|
|
@ -25,11 +25,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init-volumes
|
- name: init-volumes
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- chmod
|
- chmod
|
||||||
- "777"
|
- "777"
|
||||||
|
|
|
@ -26,11 +26,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init-volumes
|
- name: init-volumes
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- chmod
|
- chmod
|
||||||
- "777"
|
- "777"
|
||||||
|
|
|
@ -25,11 +25,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init-volumes
|
- name: init-volumes
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- chmod
|
- chmod
|
||||||
- "777"
|
- "777"
|
||||||
|
|
|
@ -59,11 +59,7 @@ find ./ -name '*networkpolicy.yaml' -exec sed -i "s|manual-install-nextcloud-aio
|
||||||
cat << EOL > /tmp/initcontainers
|
cat << EOL > /tmp/initcontainers
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init-volumes
|
- name: init-volumes
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- chmod
|
- chmod
|
||||||
- "777"
|
- "777"
|
||||||
|
@ -72,22 +68,14 @@ EOL
|
||||||
cat << EOL > /tmp/initcontainers.database
|
cat << EOL > /tmp/initcontainers.database
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init-subpath
|
- name: init-subpath
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- mkdir
|
- mkdir
|
||||||
- "-p"
|
- "-p"
|
||||||
- /nextcloud-aio-database/data
|
- /nextcloud-aio-database/data
|
||||||
volumeMountsInitContainer:
|
volumeMountsInitContainer:
|
||||||
- name: init-volumes
|
- name: init-volumes
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- chown
|
- chown
|
||||||
- 999:999
|
- 999:999
|
||||||
|
@ -97,22 +85,14 @@ EOL
|
||||||
cat << EOL > /tmp/initcontainers.clamav
|
cat << EOL > /tmp/initcontainers.clamav
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init-subpath
|
- name: init-subpath
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- mkdir
|
- mkdir
|
||||||
- "-p"
|
- "-p"
|
||||||
- /nextcloud-aio-clamav/data
|
- /nextcloud-aio-clamav/data
|
||||||
volumeMountsInitContainer:
|
volumeMountsInitContainer:
|
||||||
- name: init-volumes
|
- name: init-volumes
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- chown
|
- chown
|
||||||
- 100:100
|
- 100:100
|
||||||
|
@ -122,10 +102,7 @@ EOL
|
||||||
cat << EOL > /tmp/initcontainers.nextcloud
|
cat << EOL > /tmp/initcontainers.nextcloud
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: "delete-lost-found"
|
- name: "delete-lost-found"
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- rm
|
- rm
|
||||||
|
@ -133,11 +110,7 @@ cat << EOL > /tmp/initcontainers.nextcloud
|
||||||
- "/nextcloud-aio-nextcloud/lost+found"
|
- "/nextcloud-aio-nextcloud/lost+found"
|
||||||
volumeMountsInitRmLostFound:
|
volumeMountsInitRmLostFound:
|
||||||
- name: init-volumes
|
- name: init-volumes
|
||||||
{{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }}
|
|
||||||
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
|
||||||
{{- else }}
|
|
||||||
image: alpine
|
|
||||||
{{- end }}
|
|
||||||
command:
|
command:
|
||||||
- chmod
|
- chmod
|
||||||
- "777"
|
- "777"
|
||||||
|
|
Loading…
Reference in a new issue