From cd1cd7884cc525bc8b2928c7f4dc3a06bfa09d97 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Fri, 24 Feb 2023 21:19:40 +0100 Subject: [PATCH] Added redis --- .argo/deployment.yaml | 38 +++++++++++++++++++++++++++++++++++++- .argo/pvc.yaml | 15 +++++++++++++++ .argo/service.yaml | 15 +++++++++++++++ 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 .argo/pvc.yaml diff --git a/.argo/deployment.yaml b/.argo/deployment.yaml index 5967a73..432c62a 100644 --- a/.argo/deployment.yaml +++ b/.argo/deployment.yaml @@ -3,7 +3,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: npm-cache - namespace: gutfeel + namespace: drone labels: app: npm-cache spec: @@ -31,3 +31,39 @@ spec: - name: UPSTREAM_ADDRESS value: "https://registry.npmjs.org" restartPolicy: Always + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: npm-cache-redis + namespace: drone + labels: + app: npm-cache-redis +spec: + replicas: 1 + selector: + matchLabels: + app: npm-cache-redis + template: + metadata: + labels: + app: npm-cache-redis + spec: + containers: + - name: npm-cache-redis + image: registry.odit.services/hub/redis/redis-stack:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8001 + name: web + - containerPort: 6379 + name: redis + volumeMounts: + - name: data + mountPath: /data + restartPolicy: Always + volumes: + - name: data + persistentVolumeClaim: + claimName: "npm-cache-redis" diff --git a/.argo/pvc.yaml b/.argo/pvc.yaml new file mode 100644 index 0000000..dff9f6e --- /dev/null +++ b/.argo/pvc.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: npm-cache-redis + namespace: drone + labels: + app: npm-cache-redis +spec: + accessModes: + - ReadWriteOnce + storageClassName: "longhorn" + resources: + requests: + storage: 20Gi \ No newline at end of file diff --git a/.argo/service.yaml b/.argo/service.yaml index 6aea18f..e70c7dd 100644 --- a/.argo/service.yaml +++ b/.argo/service.yaml @@ -12,3 +12,18 @@ spec: selector: app: npm-cache clusterIP: None +--- +apiVersion: v1 +kind: Service +metadata: + name: npm-cache-redis + namespace: drone + labels: + app: npm-cache-redis +spec: + ports: + - port: 8080 + - port: 6379 + selector: + app: npm-cache-redis + clusterIP: None