Compare commits
5 Commits
cleanup-pc
...
develop
Author | SHA1 | Date | |
---|---|---|---|
96efb578b0 | |||
aefb346254 | |||
64fe182998 | |||
2b88f112fc | |||
e616ec1900 |
@ -14,21 +14,10 @@ spec:
|
|||||||
- $(MINIO_BOOTSTRAP_JOB_NAME)
|
- $(MINIO_BOOTSTRAP_JOB_NAME)
|
||||||
containers:
|
containers:
|
||||||
- name: nextcloud
|
- name: nextcloud
|
||||||
|
#envFrom:
|
||||||
|
#- configMapRef:
|
||||||
|
# name: nextcloud-env-update
|
||||||
env:
|
env:
|
||||||
- name: POSTGRES_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: nextcloud-postgres-app
|
|
||||||
key: username
|
|
||||||
- name: POSTGRES_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: nextcloud-postgres-app
|
|
||||||
key: password
|
|
||||||
- name: OBJECTSTORE_S3_BUCKET
|
|
||||||
value: nxt-minio
|
|
||||||
- name: OBJECTSTORE_S3_AUTOCREATE
|
|
||||||
value: "true"
|
|
||||||
- name: OBJECTSTORE_S3_KEY
|
- name: OBJECTSTORE_S3_KEY
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
@ -39,14 +28,6 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: nextcloud-minio-user
|
name: nextcloud-minio-user
|
||||||
key: CONSOLE_SECRET_KEY
|
key: CONSOLE_SECRET_KEY
|
||||||
- name: OBJECTSTORE_S3_HOST
|
|
||||||
value: minio:$(MINIO_SERVICE_PORT)
|
|
||||||
- name: OBJECTSTORE_S3_PORT
|
|
||||||
value: "443"
|
|
||||||
- name: OBJECTSTORE_S3_SSL
|
|
||||||
value: "true"
|
|
||||||
- name: OBJECTSTORE_S3_USEPATH_STYLE
|
|
||||||
value: "true"
|
|
||||||
|
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
@ -76,6 +57,9 @@ spec:
|
|||||||
- mountPath: /docker-entrypoint-hooks.d/post-installation/ldap.sh
|
- mountPath: /docker-entrypoint-hooks.d/post-installation/ldap.sh
|
||||||
name: script-config-ldap
|
name: script-config-ldap
|
||||||
subPath: poststart-ldap.sh
|
subPath: poststart-ldap.sh
|
||||||
|
- mountPath: /docker-entrypoint-hooks.d/before-starting/plugins.sh
|
||||||
|
name: script-config-plugins
|
||||||
|
subPath: poststart-plugins.sh
|
||||||
- mountPath: /etc/minio-ccerts
|
- mountPath: /etc/minio-ccerts
|
||||||
name: minio-certs
|
name: minio-certs
|
||||||
readOnly: true
|
readOnly: true
|
||||||
@ -87,5 +71,9 @@ spec:
|
|||||||
configMap:
|
configMap:
|
||||||
name: script-config-ldap
|
name: script-config-ldap
|
||||||
defaultMode: 0755
|
defaultMode: 0755
|
||||||
|
- name: script-config-plugins
|
||||||
|
configMap:
|
||||||
|
name: script-config-plugins
|
||||||
|
defaultMode: 0755
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
serviceAccountName: nextcloud-sa
|
serviceAccountName: nextcloud-sa
|
||||||
|
9
overlays/dev/patches/nextcloud-cpng.yaml
Normal file
9
overlays/dev/patches/nextcloud-cpng.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: nextcloud-postgres
|
||||||
|
spec:
|
||||||
|
instances: 3
|
||||||
|
storage:
|
||||||
|
size: 50Gi
|
||||||
|
storageClass: directpv-min-io
|
34
overlays/dev/resources/nextcloud/cm-plugins-script.yaml
Normal file
34
overlays/dev/resources/nextcloud/cm-plugins-script.yaml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: script-config-plugins
|
||||||
|
data:
|
||||||
|
poststart-plugins.sh: |
|
||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
(
|
||||||
|
if ! flock -n 7; then
|
||||||
|
echo "Another process is installing plugins. waiting"
|
||||||
|
flock 7
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing default apps"
|
||||||
|
plugin_list="${NEXTCLOUD_PLUGIN_LIST}"
|
||||||
|
OPTS=""
|
||||||
|
occ="/var/www/html/occ"
|
||||||
|
|
||||||
|
installed_apps=$(mktemp)
|
||||||
|
/bin/sh -c "${occ} app:list" | awk '!/Enabled|Disabled/ {print substr($2, 1, length($2)-1)}' > "${installed_apps}"
|
||||||
|
|
||||||
|
for plugin in ${plugin_list}; do
|
||||||
|
if ! grep -q "${plugin}" "${installed_apps}"; then
|
||||||
|
/bin/sh -c "${occ} ${OPTS} app:install ${plugin}"
|
||||||
|
/bin/sh -c "${occ} ${OPTS} app:update ${plugin}"
|
||||||
|
/bin/sh -c "${occ} ${OPTS} app:enable ${plugin}"
|
||||||
|
else
|
||||||
|
echo "${plugin} allready installed"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
) 7> /var/www/html/nextcloud-plugin-install.lock
|
||||||
|
echo "Apps installation finished"
|
@ -8,6 +8,28 @@ spec:
|
|||||||
- "minio"
|
- "minio"
|
||||||
pools:
|
pools:
|
||||||
- servers: 2
|
- servers: 2
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: role
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- storage
|
||||||
|
podAntiAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- labelSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: v1.min.io/tenant
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- cds
|
||||||
|
- key: v1.min.io/pool
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- pool-0
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
name: pool-0
|
name: pool-0
|
||||||
volumesPerServer: 3
|
volumesPerServer: 3
|
||||||
volumeClaimTemplate:
|
volumeClaimTemplate:
|
||||||
@ -19,6 +41,7 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 3Gi
|
storage: 3Gi
|
||||||
|
storageClassName: directpv-min-io
|
||||||
containerSecurityContext:
|
containerSecurityContext:
|
||||||
runAsUser: 1000
|
runAsUser: 1000
|
||||||
runAsGroup: 1000
|
runAsGroup: 1000
|
||||||
|
Reference in New Issue
Block a user