| Matthias Andreas Benkard | 78299f5 | 2026-10-23 07:15:47 +0200 | [diff] [blame] | 1 | kind: Deployment |
| 2 | apiVersion: apps/v1 | ||||
| 3 | metadata: | ||||
| 4 | name: redis | ||||
| 5 | namespace: system | ||||
| 6 | labels: | ||||
| 7 | name: redis | ||||
| 8 | spec: | ||||
| 9 | replicas: 1 | ||||
| 10 | selector: | ||||
| 11 | matchLabels: | ||||
| 12 | name: redis | ||||
| 13 | strategy: | ||||
| 14 | type: Recreate | ||||
| 15 | template: | ||||
| 16 | metadata: | ||||
| 17 | name: redis | ||||
| 18 | namespace: system | ||||
| 19 | labels: | ||||
| 20 | name: redis | ||||
| 21 | spec: | ||||
| 22 | volumes: | ||||
| 23 | - name: data | ||||
| 24 | persistentVolumeClaim: | ||||
| 25 | claimName: redis-data | ||||
| 26 | containers: | ||||
| 27 | - name: master | ||||
| 28 | args: ["--appendonly", "yes"] | ||||
| 29 | image: redis:5.0.7 | ||||
| 30 | volumeMounts: | ||||
| 31 | - name: data | ||||
| 32 | mountPath: /data | ||||
| 33 | ports: | ||||
| 34 | - name: redis | ||||
| 35 | containerPort: 6379 | ||||
| 36 | protocol: TCP | ||||
| 37 | resources: | ||||
| 38 | limits: | ||||
| 39 | cpu: 2000m | ||||
| 40 | memory: 2G | ||||
| 41 | requests: | ||||
| 42 | cpu: 10m | ||||
| 43 | memory: 100M | ||||
| 44 | restartPolicy: Always | ||||
| 45 | --- | ||||
| 46 | apiVersion: v1 | ||||
| 47 | kind: PersistentVolumeClaim | ||||
| 48 | metadata: | ||||
| 49 | name: redis-data | ||||
| 50 | namespace: system | ||||
| 51 | annotations: | ||||
| 52 | volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path | ||||
| 53 | spec: | ||||
| 54 | storageClassName: local-path | ||||
| 55 | accessModes: | ||||
| 56 | - ReadWriteOnce | ||||
| 57 | resources: | ||||
| 58 | requests: | ||||
| 59 | storage: 30Gi | ||||
| 60 | --- | ||||
| 61 | kind: Service | ||||
| 62 | apiVersion: v1 | ||||
| 63 | metadata: | ||||
| 64 | name: redis | ||||
| 65 | namespace: system | ||||
| 66 | labels: | ||||
| 67 | name: redis | ||||
| 68 | spec: | ||||
| 69 | ports: | ||||
| 70 | - name: redis | ||||
| 71 | protocol: TCP | ||||
| 72 | targetPort: redis | ||||
| 73 | port: 6379 | ||||
| 74 | selector: | ||||
| 75 | name: redis | ||||
| 76 | type: ClusterIP | ||||