The delegation nginx serves the .well-known documents from an nginx.conf that is rendered from ingress.domain and mounted with subPath. Changing the domain rewrote the ConfigMap but left the running pod untouched: the pod template was unchanged, so nothing rolled, and the kubelet never refreshes a subPath mount. The pod kept serving the old delegation while looking perfectly healthy - the failure mode from #82. The pod template now carries checksum/config over the rendered delegation ConfigMap, so a changed nginx.conf rolls the deployment. Also documents the limit that remains for homeserver.yaml: it comes from a 1Password-backed Secret, whose content Helm never sees, and the operator's own auto-restart only ever covers Deployments - not this StatefulSet. That case needs a manual rollout restart, which the values.yaml now says out loud. Major bump: runtime behavior changes - a delegation config change now costs a restart of the nginx pod (a few seconds, no persistent state).
160 lines
5.3 KiB
YAML
160 lines
5.3 KiB
YAML
# Scale the whole chart down without uninstalling it: scaleDown: true renders
|
|
# every Deployment/StatefulSet with replicas: 0 (and suspends CronJobs) and
|
|
# takes precedence over any per-workload replicas value. PVCs, Secrets and
|
|
# Services stay in place; scaleDown: false brings the workloads back up.
|
|
scaleDown: false
|
|
|
|
secrets:
|
|
# homeserver.yaml is mounted into the Synapse StatefulSet from the Secret the
|
|
# 1Password operator materializes from this item.
|
|
#
|
|
# Known limitation (#82): a change to the item in the vault does NOT restart
|
|
# Synapse. Helm cannot hash the content (it never sees it - the operator fills
|
|
# the Secret in-cluster after rendering), so the checksum/config mechanism the
|
|
# delegation nginx uses does not apply here. The operator's own
|
|
# "operator.1password.io/auto-restart" annotation is no help either: it only
|
|
# ever restarts Deployments, and this workload is a StatefulSet (verified
|
|
# against onepassword-operator 1.12.0). After changing the item, restart
|
|
# Synapse by hand:
|
|
# kubectl rollout restart statefulset <release>-matrix-synapse-sfs
|
|
configSecretRef: null
|
|
|
|
matrix:
|
|
# Replica count for this workload; 0 is allowed and scales it down.
|
|
# The chart-global scaleDown flag takes precedence.
|
|
replicas: 1
|
|
serverName: null
|
|
timezone: UTC
|
|
# The upstream image (ghcr.io/element-hq/synapse) only drops privileges
|
|
# itself (via gosu, driven by UID/GID env vars) when started as root; with
|
|
# an explicit non-root runAsUser it skips that step and runs directly as
|
|
# that user. Synapse writes to /data and /media_store (both on the PVC) and
|
|
# to /tmp (mounted as an emptyDir by the chart), so the root filesystem
|
|
# stays read-only. The uid/gid 1000 matches the previous gosu default, so
|
|
# existing PVC data stays accessible.
|
|
securityContext:
|
|
pod:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
fsGroup: 1000
|
|
fsGroupChangePolicy: Always
|
|
container:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
runAsNonRoot: true
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
scheme: HTTP
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
scheme: HTTP
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
# The startup probe gates liveness/readiness. Synapse can take a
|
|
# while to start (migrations, cache warmup): budget 10s * 30 = 300s.
|
|
startupProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
scheme: HTTP
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 30
|
|
# Extra environment variables, appended to the ones the chart always sets.
|
|
# Values are rendered through tpl; value, secretKeyRef and configMapKeyRef
|
|
# forms are supported.
|
|
env: []
|
|
resources:
|
|
# Limits are optional: memory and ephemeral-storage limits default to
|
|
# limitFactor x the request, an explicitly set limit always wins, and a
|
|
# CPU limit is only set when configured explicitly under "limits".
|
|
limitFactor: 3
|
|
requests:
|
|
memory: "1Gi"
|
|
cpu: "1"
|
|
ephemeralStorage: "1Gi"
|
|
delegation:
|
|
# Replica count for this workload; 0 is allowed and scales it down.
|
|
# The chart-global scaleDown flag takes precedence.
|
|
replicas: 1
|
|
enabled: false
|
|
serverUrl: null
|
|
# Auxiliary image, pinned independently of appVersion (which tracks
|
|
# Synapse). Reviewed alongside every app-version update round.
|
|
image:
|
|
repository: nginx
|
|
tag: 1.30.4
|
|
# The delegation nginx runs as the image's unprivileged nginx user
|
|
# (uid 101) and listens on the unprivileged port 8080; pid file and temp
|
|
# paths are redirected to the /tmp emptyDir by the mounted nginx.conf.
|
|
securityContext:
|
|
pod:
|
|
runAsNonRoot: true
|
|
runAsUser: 101
|
|
runAsGroup: 101
|
|
container:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
runAsNonRoot: true
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /.well-known/matrix/server
|
|
port: http
|
|
scheme: HTTP
|
|
periodSeconds: 10
|
|
timeoutSeconds: 3
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /.well-known/matrix/server
|
|
port: http
|
|
scheme: HTTP
|
|
periodSeconds: 10
|
|
timeoutSeconds: 3
|
|
failureThreshold: 3
|
|
# The startup probe gates liveness/readiness. Startup budget = 5s * 30 = 150s.
|
|
startupProbe:
|
|
httpGet:
|
|
path: /.well-known/matrix/server
|
|
port: http
|
|
scheme: HTTP
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
failureThreshold: 30
|
|
resources:
|
|
# Limits are optional: memory and ephemeral-storage limits default to
|
|
# limitFactor x the request, an explicitly set limit always wins, and a
|
|
# CPU limit is only set when configured explicitly under "limits".
|
|
limitFactor: 3
|
|
requests:
|
|
memory: "64Mi"
|
|
cpu: "125m"
|
|
ephemeralStorage: "50Mi"
|
|
|
|
storage:
|
|
amount: 10Gi
|
|
storageClass: longhorn-encrypted
|
|
|
|
ingress:
|
|
domain: null
|
|
clusterIssuer: null
|
|
className: nginx
|
|
# Extra annotations for the Ingress; merged with the cert-manager
|
|
# cluster-issuer annotation the chart always sets.
|
|
annotations: {}
|