github.com/castai/kvisor@v1.7.1-0.20240516114728-b3572a2607b5/demo/2.steal-data/redis.yaml (about) 1 apiVersion: v1 2 kind: Namespace 3 metadata: 4 name: tools 5 --- 6 apiVersion: apps/v1 7 kind: Deployment 8 metadata: 9 name: redis-storage 10 namespace: tools 11 spec: 12 replicas: 1 13 selector: 14 matchLabels: 15 app: redis-storage 16 strategy: 17 rollingUpdate: 18 maxSurge: 25% 19 maxUnavailable: 25% 20 type: RollingUpdate 21 template: 22 metadata: 23 labels: 24 app: redis-storage 25 spec: 26 containers: 27 - image: redis:alpine@sha256:1f27b9eb680ffcf6c68966c0d5f578bb1b030ca7cd8ec4e758c429e7f72005a0 28 imagePullPolicy: IfNotPresent 29 livenessProbe: 30 failureThreshold: 3 31 periodSeconds: 5 32 successThreshold: 1 33 tcpSocket: 34 port: 6379 35 timeoutSeconds: 1 36 name: redis 37 ports: 38 - containerPort: 6379 39 protocol: TCP 40 readinessProbe: 41 failureThreshold: 3 42 periodSeconds: 5 43 successThreshold: 1 44 tcpSocket: 45 port: 6379 46 timeoutSeconds: 1 47 resources: 48 limits: 49 cpu: 125m 50 memory: 256Mi 51 requests: 52 cpu: 70m 53 memory: 200Mi 54 securityContext: 55 allowPrivilegeEscalation: false 56 capabilities: 57 drop: 58 - ALL 59 privileged: false 60 readOnlyRootFilesystem: true 61 volumeMounts: 62 - mountPath: /data 63 name: redis-data 64 dnsPolicy: ClusterFirst 65 restartPolicy: Always 66 securityContext: 67 fsGroup: 1000 68 runAsGroup: 1000 69 runAsNonRoot: true 70 runAsUser: 1000 71 serviceAccountName: default 72 terminationGracePeriodSeconds: 30 73 volumes: 74 - emptyDir: {} 75 name: redis-data 76 --- 77 apiVersion: v1 78 kind: Service 79 metadata: 80 name: redis-storage 81 namespace: tools 82 spec: 83 ports: 84 - name: tcp-redis 85 port: 6379 86 protocol: TCP 87 targetPort: 6379 88 selector: 89 app: redis-storage 90 sessionAffinity: None 91 type: ClusterIP