.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user