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

88 lines
2.0 KiB
YAML
Raw Normal View History

2023-08-16 11:55:28 +08:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
2023-08-16 12:01:41 +08:00
name: redis-stack
2023-08-16 11:55:28 +08:00
labels:
2023-08-16 12:01:41 +08:00
app: redis-stack
2023-08-16 11:55:28 +08:00
spec:
replicas: 1
selector:
matchLabels:
2023-08-16 12:01:41 +08:00
app: redis-stack
2023-08-16 11:55:28 +08:00
template:
metadata:
labels:
2023-08-16 12:01:41 +08:00
app: redis-stack
2023-08-16 11:55:28 +08:00
spec:
initContainers:
- name: init
image: busybox
imagePullPolicy: IfNotPresent
command: ["/bin/sh", "-c", "sysctl -w net.core.somaxconn=1024"]
securityContext:
privileged: true
containers:
2023-08-16 12:01:41 +08:00
- name: redis-stack
2023-08-16 12:03:10 +08:00
image: redis/redis-stack-server:7.2.0-v0
2023-08-16 11:55:28 +08:00
ports:
2023-08-16 14:30:48 +08:00
- protocol: TCP
2023-08-29 16:38:28 +08:00
containerPort: 6379
2023-08-16 14:30:48 +08:00
env:
- name: "REDIS_ARGS"
value: "--requirepass beaconfire@123"
2023-08-29 16:38:28 +08:00
volumeMounts:
- name: redis-stack-dev
mountPath: /data
2023-08-16 11:55:28 +08:00
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
2023-08-29 16:38:28 +08:00
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
2023-08-16 11:55:28 +08:00
---
apiVersion: v1
kind: Service
metadata:
2023-09-07 12:51:32 +08:00
name: redis
2023-08-16 11:55:28 +08:00
spec:
ports:
- port: 6379
protocol: TCP
targetPort: 6379
2023-09-07 12:59:19 +08:00
nodePort: 30015
2023-08-16 11:55:28 +08:00
selector:
app: redis-stack
type: NodePort