feat(redis): add shared Redis 8.10.3 to platform
This commit is contained in:
1 parent
eb96f56349
commit
67356b1489
13 files changed
+671
No files matched your search
@@ -0,0 +1,132 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: redis
|
||||
spec:
|
||||
serviceName: redis-headless
|
||||
replicas: 1
|
||||
persistentVolumeClaimRetentionPolicy:
|
||||
whenDeleted: Retain
|
||||
whenScaled: Retain
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: redis
|
||||
spec:
|
||||
automountServiceAccountToken: false
|
||||
terminationGracePeriodSeconds: 60
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 999
|
||||
runAsGroup: 1000
|
||||
fsGroup: 1000
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:8.10.3-alpine
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- sh
|
||||
- /etc/redis/start-redis.sh
|
||||
env:
|
||||
- name: REDIS_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: redis-auth
|
||||
key: username
|
||||
- name: REDISCLI_AUTH
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: redis-auth
|
||||
key: password
|
||||
ports:
|
||||
- name: redis
|
||||
containerPort: 6379
|
||||
startupProbe:
|
||||
exec:
|
||||
command: [sh, -ec, 'test "$(redis-cli --user "$REDIS_USERNAME" ping)" = PONG']
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 120
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: [sh, -ec, 'test "$(redis-cli --user "$REDIS_USERNAME" ping)" = PONG']
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: [sh, -ec, 'test "$(redis-cli --user "$REDIS_USERNAME" ping)" = PONG']
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 4Gi
|
||||
limits:
|
||||
memory: 5Gi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: [ALL]
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
- name: config
|
||||
mountPath: /etc/redis
|
||||
readOnly: true
|
||||
- name: acl
|
||||
mountPath: /run/redis-acl
|
||||
- name: exporter
|
||||
image: oliver006/redis_exporter:v1.94.0
|
||||
args:
|
||||
- --redis.addr=redis://127.0.0.1:6379
|
||||
- --redis-only-metrics
|
||||
- --disable-scrape-endpoint
|
||||
- --connection-timeout=5s
|
||||
env:
|
||||
- name: REDIS_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: redis-auth
|
||||
key: username
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: redis-auth
|
||||
key: password
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9121
|
||||
resources:
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: 32Mi
|
||||
limits:
|
||||
memory: 128Mi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
capabilities:
|
||||
drop: [ALL]
|
||||
volumes:
|
||||
- name: acl
|
||||
emptyDir:
|
||||
medium: Memory
|
||||
sizeLimit: 1Mi
|
||||
- name: config
|
||||
configMap:
|
||||
name: redis-config
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: local-path
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
Reference in new issue
Block a user