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

88 lines
2.0 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-stack
labels:
app: redis-stack
spec:
replicas: 1
selector:
matchLabels:
app: redis-stack
template:
metadata:
labels:
app: redis-stack
spec:
initContainers:
- name: init
image: busybox
imagePullPolicy: IfNotPresent
command: ["/bin/sh", "-c", "sysctl -w net.core.somaxconn=1024"]
securityContext:
privileged: true
containers:
- name: redis-stack
image: redis/redis-stack-server:7.2.0-v0
ports:
- protocol: TCP
containerPort: 6379
env:
- name: "REDIS_ARGS"
value: "--requirepass beaconfire@123"
volumeMounts:
- name: redis-stack-dev
mountPath: /data
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
volumes:
- name: redis-stack-dev
hostPath:
path: /data/dev/redis-stack
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "kubernetes.io/hostname"
operator: In
values:
- bfs-k8snode-10-2-0-13.hetzner.base.beaconfireinc.com
---
apiVersion: v1
kind: Service
metadata:
name: redis
spec:
ports:
- port: 6379
protocol: TCP
targetPort: 6379
nodePort: 30015
selector:
app: redis-stack
type: NodePort