Skip to content

Commit 5ae4057

Browse files
committed
adjusted helm
1 parent 1b5c51f commit 5ae4057

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

helm/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,26 @@ You can add additional exclusions using the `additionalNoProxy` list. The NO_PRO
9292
- IPv6 addresses (e.g., "::1")
9393
- IPv6 ranges in CIDR notation (e.g., "fe80::/10")
9494

95+
### Database Persistence
96+
97+
When using database persistence with a local SQLite database, the chart automatically configures the necessary permissions. The `podSecurityContext.fsGroup` is set to 1000 by default to ensure the ZenML container (running as UID 1000) can write to the persistent volume.
98+
99+
Example configuration:
100+
101+
```yaml
102+
zenml:
103+
database:
104+
persistence:
105+
enabled: true
106+
size: "10Gi"
107+
# storageClassName: "" # Optional: use default storage class if not specified
108+
109+
# podSecurityContext.fsGroup is set to 1000 by default
110+
# This ensures the container can write to the persistent volume
111+
```
112+
113+
If you override `podSecurityContext`, ensure that `fsGroup: 1000` is set when using persistent volumes, otherwise the container will not be able to write to the mounted volume and will crash.
114+
95115
## Telemetry
96116

97117
The ZenML server collects anonymous usage data to help us improve the product. You can opt out by setting `zenml.analyticsOptIn` to false.

helm/values.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,10 @@ zenml:
314314
# If set to true, path where the local database is created will be
315315
# mounted as a persistent volume so the data is not lost on pod restarts.
316316
# Only relevant for local sqlite database.
317+
# When persistence is enabled, ensure that podSecurityContext.fsGroup
318+
# is set to 1000 (this is the default) so that the ZenML container can write to
319+
# the persistent volume. The container runs as UID 1000, and without fsGroup
320+
# set, the PVC will be mounted with root:root ownership, causing permission errors.
317321
persistence:
318322
enabled: false
319323
size: 1Gi
@@ -1173,8 +1177,14 @@ serviceAccount:
11731177

11741178
podAnnotations: {}
11751179

1176-
podSecurityContext: {}
1177-
# fsGroup: 1000 # if you're using a PVC for backup, this should necessarily be set.
1180+
podSecurityContext:
1181+
# fsGroup must be set to 1000 when using persistent volumes (database persistence or backup PVCs)
1182+
# to ensure the ZenML container (running as UID 1000) can write to the mounted volumes.
1183+
# This is set by default to prevent permission issues.
1184+
fsGroup: 1000
1185+
# fsGroupChangePolicy controls when fsGroup ownership changes are applied.
1186+
# "OnRootMismatch" only changes ownership if the root of the volume doesn't match the fsGroup.
1187+
fsGroupChangePolicy: "OnRootMismatch"
11781188

11791189
securityContext:
11801190
runAsNonRoot: true

0 commit comments

Comments
 (0)