This commit is contained in:
2026-03-20 23:12:36 +00:00
parent f36af73fe0
commit cd8d3da45b

View File

@@ -32,29 +32,9 @@ spec:
fsGroup: 999
fsGroupChangePolicy: OnRootMismatch
initContainers:
- name: init-redis-data
image: busybox:1.36
command:
- sh
- -c
- |
set -eu
mkdir -p /mnt/redis-data
chown -R 999:999 /mnt/redis-data
chmod 0770 /mnt/redis-data
volumeMounts:
- name: redis-storage
mountPath: /mnt/redis-data
subPath: redis-data
containers:
- name: redis
image: redis:7.2-alpine
imagePullPolicy: IfNotPresent
ports:
- containerPort: 6379
name: redis
args:
- "--save"
- "60"
@@ -70,19 +50,11 @@ spec:
volumeMounts:
- name: redis-storage
mountPath: /data
subPath: redis-data
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
cpu: "2"
memory: 1Gi
volumes:
- name: redis-storage
persistentVolumeClaim:
claimName: data
claimName: redis-storage
---
apiVersion: v1
kind: Service