diff --git a/tcs-upgrade/redis/redis.yaml b/tcs-upgrade/redis/redis.yaml index 0a626df..aa86ce8 100644 --- a/tcs-upgrade/redis/redis.yaml +++ b/tcs-upgrade/redis/redis.yaml @@ -1,20 +1,3 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: redis-config - labels: - app: redis -data: - redis.conf: |- - dir /srv - port 6379 - bind 0.0.0.0 - appendonly yes - daemonize no - requirepass beaconfire1qaz@WSX - pidfile /srv/redis-6379.pid - --- apiVersion: apps/v1 kind: Deployment @@ -26,7 +9,7 @@ spec: replicas: 1 selector: matchLabels: - app: redis + app: redisx template: metadata: labels: @@ -41,13 +24,16 @@ spec: privileged: true containers: - name: redis - image: redis:6.2.12 - command: - - "sh" - - "-c" - - "redis-server /usr/local/redis/redis.conf" + image: redis/redis-stack-server:7.2.0-v0 ports: - - containerPort: 6379 + - protocol: TCP + containerPort: 6379 + env: + - name: "REDIS_ARGS" + value: "--requirepass beaconfire@123" + volumeMounts: + - name: tcs-redis + mountPath: /data resources: limits: cpu: 1 @@ -71,14 +57,19 @@ spec: periodSeconds: 10 successThreshold: 1 failureThreshold: 3 - volumeMounts: - - name: config - mountPath: /usr/local/redis/redis.conf - subPath: redis.conf volumes: - - name: config - configMap: - name: redis-config + - name: tcs-redis + hostPath: + path: /data/tcs/redis + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "kubernetes.io/hostname" + operator: In + values: + - bfs-k8snode-10-2-1-5.hetzner.base.beaconfireinc.com --- apiVersion: v1 @@ -92,5 +83,5 @@ spec: targetPort: 6379 nodePort: 30015 selector: - app: redis + app: redis-stack type: NodePort