From f2908d326a45398bd7cc311d6d73778d83be0acf Mon Sep 17 00:00:00 2001 From: Oguzcan Kirmemis Date: Fri, 29 Sep 2023 16:12:51 +0200 Subject: [PATCH] Revert redis back into deployment Signed-off-by: Oguzcan Kirmemis --- kubernetes/templates/redis.yaml | 67 +++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 kubernetes/templates/redis.yaml diff --git a/kubernetes/templates/redis.yaml b/kubernetes/templates/redis.yaml new file mode 100644 index 00000000..6dc0268f --- /dev/null +++ b/kubernetes/templates/redis.yaml @@ -0,0 +1,67 @@ +apiVersion: v1 +kind: Service +metadata: + name: redis + labels: + app: redis +spec: + ports: + - name: "6379" + port: 6379 + selector: + app: redis +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: redis + name: redis +spec: + replicas: 1 + selector: + matchLabels: + app: redis + template: + metadata: + labels: + app: redis + spec: + containers: + - image: redis:3.0 + imagePullPolicy: IfNotPresent + name: redis + resources: + {{ if .Values.less_resources }} + requests: + cpu: 50m + memory: 500M + {{ else }} + limits: + memory: 2G + cpu: 500m + requests: + memory: 1G + cpu: 500m + {{ end }} + ports: + - containerPort: 6379 + protocol: TCP + volumeMounts: + - mountPath: /data + name: redis-data + volumes: + - name: redis-data + persistentVolumeClaim: + claimName: redis-data +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: redis-data +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi \ No newline at end of file