OKR/dev-upgrade/redis/redis-stack-dev.yaml

98 lines
2.1 KiB
YAML

---
apiVersion: v1
kind: ConfigMap
metadata:
name: redis-stack-config
labels:
app: redis-stack
data:
redis-stack.conf: |-
dir /srv
port 6379
bind 0.0.0.0
appendonly yes
daemonize no
requirepass beaconfire@123
pidfile /srv/redis-6379.pid
loadmodule /opt/redis-stack/lib/redisearch.so
loadmodule /opt/redis-stack/lib/redistimeseries.so
loadmodule /opt/redis-stack/lib/rejson.so
loadmodule /opt/redis-stack/lib/redisbloom.so
loadmodule /opt/redis-stack/lib/redisgears.so v8-plugin-path /opt/redis-stack/lib/libredisgears_v8_plugin.so
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
labels:
app: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
initContainers:
- name: init
image: busybox
imagePullPolicy: IfNotPresent
command: ["/bin/sh", "-c", "sysctl -w net.core.somaxconn=1024"]
securityContext:
privileged: true
containers:
- name: redis
image: redis/redis-stack-redis:7.2.0-v0
ports:
- containerPort: 6379
resources:
limits:
cpu: 1
memory: 1Gi
requests:
cpu: 50m
memory: 128Mi
livenessProbe:
tcpSocket:
port: 6379
initialDelaySeconds: 300
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
readinessProbe:
tcpSocket:
port: 6379
initialDelaySeconds: 5
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
volumeMounts:
- name: config
mountPath: /etc/redis-stack.conf
subPath: redis-stack.conf
volumes:
- name: config
configMap:
name: redis-stack-config
---
apiVersion: v1
kind: Service
metadata:
name: redis-stack
spec:
ports:
- port: 6379
protocol: TCP
targetPort: 6379
nodePort: 30014
selector:
app: redis-stack
type: NodePort