nextcloud: fit measured resources and serialize volume rollout

This commit is contained in:
jenkins 2026-10-04 04:19:11 -05:00
parent 64eb26014f
commit 5ba2211ad4

View File

@ -8,6 +8,12 @@ metadata:
app: nextcloud app: nextcloud
spec: spec:
replicas: 1 replicas: 1
# These volumes are RWO; release the old pod before replacing it.
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
selector: selector:
matchLabels: matchLabels:
app: nextcloud app: nextcloud
@ -18,6 +24,7 @@ spec:
annotations: annotations:
vault.hashicorp.com/agent-inject: "true" vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/agent-init-first: "true" vault.hashicorp.com/agent-init-first: "true"
vault.hashicorp.com/agent-requests-cpu: "25m"
vault.hashicorp.com/role: "nextcloud" vault.hashicorp.com/role: "nextcloud"
vault.hashicorp.com/agent-inject-secret-nextcloud-env.sh: "kv/data/atlas/nextcloud/nextcloud-db" vault.hashicorp.com/agent-inject-secret-nextcloud-env.sh: "kv/data/atlas/nextcloud/nextcloud-db"
vault.hashicorp.com/agent-inject-template-nextcloud-env.sh: | vault.hashicorp.com/agent-inject-template-nextcloud-env.sh: |
@ -55,7 +62,7 @@ spec:
serviceAccountName: nextcloud-vault serviceAccountName: nextcloud-vault
initContainers: initContainers:
- name: seed-nextcloud-web - name: seed-nextcloud-web
image: nextcloud:29-apache image: nextcloud:29-apache@sha256:a7fbfcd4759bdd19b8fb8b1044b47ee3a9471d2e2c8bc68d56a2e671f86cebd2
command: ["/bin/sh", "-c"] command: ["/bin/sh", "-c"]
args: args:
- | - |
@ -104,7 +111,7 @@ spec:
mountPath: /var/www/html/config/extra.config.php mountPath: /var/www/html/config/extra.config.php
subPath: extra.config.php subPath: extra.config.php
- name: install-nextcloud - name: install-nextcloud
image: nextcloud:29-apache image: nextcloud:29-apache@sha256:a7fbfcd4759bdd19b8fb8b1044b47ee3a9471d2e2c8bc68d56a2e671f86cebd2
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
runAsGroup: 0 runAsGroup: 0
@ -196,7 +203,7 @@ spec:
subPath: extra.config.php subPath: extra.config.php
containers: containers:
- name: nextcloud - name: nextcloud
image: nextcloud:29-apache image: nextcloud:29-apache@sha256:a7fbfcd4759bdd19b8fb8b1044b47ee3a9471d2e2c8bc68d56a2e671f86cebd2
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["/bin/sh", "-c"] command: ["/bin/sh", "-c"]
args: args:
@ -235,6 +242,14 @@ spec:
ports: ports:
- containerPort: 80 - containerPort: 80
name: http name: http
readinessProbe:
httpGet:
path: /status.php
port: http
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
volumeMounts: volumeMounts:
- name: nextcloud-web - name: nextcloud-web
mountPath: /var/www/html mountPath: /var/www/html
@ -250,7 +265,8 @@ spec:
resources: resources:
requests: requests:
cpu: 250m cpu: 250m
memory: 1Gi # Measured 24-hour peak: 394Mi; burst limit stays at 3Gi.
memory: 512Mi
limits: limits:
cpu: 1 cpu: 1
memory: 3Gi memory: 3Gi