5 Commits

Author SHA1 Message Date
96efb578b0 fix(overlay/dev): cleanup 2024-01-25 14:47:16 +01:00
aefb346254 Merge pull request 'feat(plugins): adding default apps install with env' (#2) from cleanup-again into develop
Reviewed-on: #2
2023-09-20 14:28:29 +02:00
64fe182998 feat(plugins): adding default apps install with env
New configmap cm-plugin-scripts uses NEXTCLOUD_PLUGIN_LIST env
to install apps

This script is runned on each pod "start"
2023-09-20 14:26:08 +02:00
2b88f112fc Merge pull request 'feat(all): global cleanning adding dev overlay' (#1) from ldap_ext into develop
Reviewed-on: #1
2023-09-18 09:56:46 +02:00
e616ec1900 feat(all): global cleanning adding dev overlay 2023-09-15 10:44:35 +02:00
4 changed files with 76 additions and 22 deletions

View File

@ -14,21 +14,10 @@ spec:
- $(MINIO_BOOTSTRAP_JOB_NAME)
containers:
- name: nextcloud
#envFrom:
#- configMapRef:
# name: nextcloud-env-update
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
valueFrom:
secretKeyRef:
@ -39,14 +28,6 @@ spec:
secretKeyRef:
name: nextcloud-minio-user
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:
httpGet:
@ -76,6 +57,9 @@ spec:
- mountPath: /docker-entrypoint-hooks.d/post-installation/ldap.sh
name: script-config-ldap
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
name: minio-certs
readOnly: true
@ -87,5 +71,9 @@ spec:
configMap:
name: script-config-ldap
defaultMode: 0755
- name: script-config-plugins
configMap:
name: script-config-plugins
defaultMode: 0755
restartPolicy: Always
serviceAccountName: nextcloud-sa

View 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

View 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"

View File

@ -8,6 +8,28 @@ spec:
- "minio"
pools:
- 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
volumesPerServer: 3
volumeClaimTemplate:
@ -19,6 +41,7 @@ spec:
resources:
requests:
storage: 3Gi
storageClassName: directpv-min-io
containerSecurityContext:
runAsUser: 1000
runAsGroup: 1000