mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-15 10:10:17 +00:00
Merge pull request #4387 from nextcloud/enh/4362/mirror-support
Helm chart - Add private mirror support for OCI
This commit is contained in:
commit
faf94f0cee
1 changed files with 34 additions and 0 deletions
|
|
@ -59,7 +59,11 @@ 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"
|
||||||
|
{{- else }}
|
||||||
image: alpine
|
image: alpine
|
||||||
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- chmod
|
- chmod
|
||||||
- "777"
|
- "777"
|
||||||
|
|
@ -68,14 +72,22 @@ 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"
|
||||||
|
{{- else }}
|
||||||
image: alpine
|
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"
|
||||||
|
{{- else }}
|
||||||
image: alpine
|
image: alpine
|
||||||
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- chown
|
- chown
|
||||||
- 999:999
|
- 999:999
|
||||||
|
|
@ -85,14 +97,22 @@ 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"
|
||||||
|
{{- else }}
|
||||||
image: alpine
|
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"
|
||||||
|
{{- else }}
|
||||||
image: alpine
|
image: alpine
|
||||||
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- chown
|
- chown
|
||||||
- 100:100
|
- 100:100
|
||||||
|
|
@ -102,14 +122,22 @@ 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"
|
||||||
|
{{- else }}
|
||||||
image: alpine
|
image: alpine
|
||||||
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- rm
|
- rm
|
||||||
- "-rf"
|
- "-rf"
|
||||||
- "/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"
|
||||||
|
{{- else }}
|
||||||
image: alpine
|
image: alpine
|
||||||
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- chmod
|
- chmod
|
||||||
- "777"
|
- "777"
|
||||||
|
|
@ -272,6 +300,8 @@ EOL
|
||||||
# shellcheck disable=SC1083
|
# shellcheck disable=SC1083
|
||||||
find ./ -name '*apache-deployment.yaml' -exec sed -i "/^.*\- env:/r /tmp/additional-apache.config" \{} \;
|
find ./ -name '*apache-deployment.yaml' -exec sed -i "/^.*\- env:/r /tmp/additional-apache.config" \{} \;
|
||||||
|
|
||||||
|
# shellcheck disable=SC1083
|
||||||
|
find ./ -name '*deployment.yaml' -exec sed -i 's|image: nextcloud/|image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.NEXTCLOUD_IMAGE_ORG }}"/|' \{} \;
|
||||||
|
|
||||||
cd ../
|
cd ../
|
||||||
mkdir -p ../helm-chart/
|
mkdir -p ../helm-chart/
|
||||||
|
|
@ -326,6 +356,10 @@ SMTP_NAME: # (empty by default): The username for the authentication.
|
||||||
SMTP_PASSWORD: # (empty by default): The password for the authentication.
|
SMTP_PASSWORD: # (empty by default): The password for the authentication.
|
||||||
MAIL_FROM_ADDRESS: # (not set by default): Set the local-part for the 'from' field in the emails sent by Nextcloud.
|
MAIL_FROM_ADDRESS: # (not set by default): Set the local-part for the 'from' field in the emails sent by Nextcloud.
|
||||||
MAIL_DOMAIN: # (not set by default): Set a different domain for the emails than the domain where Nextcloud is installed.
|
MAIL_DOMAIN: # (not set by default): Set a different domain for the emails than the domain where Nextcloud is installed.
|
||||||
|
|
||||||
|
IMAGE_MIRROR_PREFIX: # Setting this allows you to pull Nextcloud images through a mirror registry.
|
||||||
|
NEXTCLOUD_IMAGE_ORG: nextcloud # Setting this allows you to change the image's org name in case a different image needs to be used e.g. for compliance reasons.
|
||||||
|
ALPINE_IMAGE_ORG: # Setting this allows you to change the image's org name in case a different image needs to be used e.g. for compliance reasons.
|
||||||
ADDITIONAL_CONFIG
|
ADDITIONAL_CONFIG
|
||||||
|
|
||||||
mv /tmp/sample.conf ../helm-chart/values.yaml
|
mv /tmp/sample.conf ../helm-chart/values.yaml
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue