diff --git a/k8s/apps/n8n/external-secrets.yaml b/k8s/apps/n8n/external-secrets.yaml index 5c15326..08c8bff 100644 --- a/k8s/apps/n8n/external-secrets.yaml +++ b/k8s/apps/n8n/external-secrets.yaml @@ -10,8 +10,9 @@ spec: template: type: Opaque data: - postgres-password: "{{ .psql | trim }}" - N8N_ENCRYPTION_KEY: "{{ .enc_pass | trim }}" + password: "{{ .psql | trim }}" + username: "n8n" + encryptionkey: "{{ .enc_pass | trim }}" data: - secretKey: psql sourceRef: diff --git a/k8s/apps/n8n/plain/kustomization.yaml b/k8s/apps/n8n/plain/kustomization.yaml index 8874718..42d2630 100644 --- a/k8s/apps/n8n/plain/kustomization.yaml +++ b/k8s/apps/n8n/plain/kustomization.yaml @@ -3,6 +3,8 @@ kind: Kustomization resources: - storage.yaml + - redis-deployment.yaml + - redis-service.yaml - deployment-main.yaml - deployment-worker.yaml - service.yaml diff --git a/k8s/apps/n8n/plain/redis-deployment.yaml b/k8s/apps/n8n/plain/redis-deployment.yaml new file mode 100644 index 0000000..e89febf --- /dev/null +++ b/k8s/apps/n8n/plain/redis-deployment.yaml @@ -0,0 +1,57 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: n8n-redis + labels: + app: redis + component: n8n +spec: + replicas: 1 + selector: + matchLabels: + app: redis + component: n8n + template: + metadata: + labels: + app: redis + component: n8n + spec: + containers: + - name: redis + image: redis:7-alpine + ports: + - containerPort: 6379 + name: redis + command: + - redis-server + - --appendonly + - "yes" + - --save + - "900 1" + volumeMounts: + - name: redis-data + mountPath: /data + resources: + requests: + cpu: 50m + memory: 64Mi + limits: + cpu: 200m + memory: 256Mi + livenessProbe: + tcpSocket: + port: 6379 + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + exec: + command: + - redis-cli + - ping + initialDelaySeconds: 5 + periodSeconds: 5 + volumes: + - name: redis-data + emptyDir: {} \ No newline at end of file diff --git a/k8s/apps/n8n/plain/redis-service.yaml b/k8s/apps/n8n/plain/redis-service.yaml new file mode 100644 index 0000000..09c1558 --- /dev/null +++ b/k8s/apps/n8n/plain/redis-service.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: n8n-redis + labels: + app: redis + component: n8n +spec: + selector: + app: redis + component: n8n + ports: + - name: redis + port: 6379 + targetPort: 6379 + protocol: TCP + type: ClusterIP \ No newline at end of file