From 3582c2e9e21287f8747f05a4a4462d256cf2188b Mon Sep 17 00:00:00 2001 From: Kelly Date: Mon, 15 Dec 2025 19:03:05 -0700 Subject: [PATCH] fix(k8s): Use external Postgres/Redis/MinIO services - Update secrets.yaml with correct MinIO credentials - Add Redis connection details - Remove postgres.yaml (use external 10.100.6.50) - Remove redis.yaml (use external 10.100.9.50) --- k8s/postgres.yaml | 76 ----------------------------------------------- k8s/redis.yaml | 66 ---------------------------------------- k8s/secrets.yaml | 21 +++++++++++-- 3 files changed, 19 insertions(+), 144 deletions(-) delete mode 100644 k8s/postgres.yaml delete mode 100644 k8s/redis.yaml diff --git a/k8s/postgres.yaml b/k8s/postgres.yaml deleted file mode 100644 index 33c8c137..00000000 --- a/k8s/postgres.yaml +++ /dev/null @@ -1,76 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: postgres-pvc - namespace: cannaiq -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 5Gi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: postgres - namespace: cannaiq -spec: - replicas: 1 - selector: - matchLabels: - app: postgres - template: - metadata: - labels: - app: postgres - spec: - containers: - - name: postgres - image: postgres:15-alpine - ports: - - containerPort: 5432 - env: - - name: POSTGRES_USER - valueFrom: - secretKeyRef: - name: scraper-secrets - key: POSTGRES_USER - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: scraper-secrets - key: POSTGRES_PASSWORD - - name: POSTGRES_DB - valueFrom: - secretKeyRef: - name: scraper-secrets - key: POSTGRES_DB - - name: PGDATA - value: /var/lib/postgresql/data/pgdata - volumeMounts: - - name: postgres-storage - mountPath: /var/lib/postgresql/data - resources: - requests: - memory: "256Mi" - cpu: "250m" - limits: - memory: "512Mi" - cpu: "500m" - volumes: - - name: postgres-storage - persistentVolumeClaim: - claimName: postgres-pvc ---- -apiVersion: v1 -kind: Service -metadata: - name: postgres - namespace: cannaiq -spec: - selector: - app: postgres - ports: - - port: 5432 - targetPort: 5432 diff --git a/k8s/redis.yaml b/k8s/redis.yaml deleted file mode 100644 index 14856bd2..00000000 --- a/k8s/redis.yaml +++ /dev/null @@ -1,66 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: redis-data - namespace: cannaiq -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: redis - namespace: cannaiq -spec: - replicas: 1 - selector: - matchLabels: - app: redis - template: - metadata: - labels: - app: redis - spec: - containers: - - name: redis - image: redis:7-alpine - ports: - - containerPort: 6379 - resources: - requests: - memory: "64Mi" - cpu: "50m" - limits: - memory: "256Mi" - cpu: "200m" - volumeMounts: - - name: redis-data - mountPath: /data - command: - - redis-server - - --appendonly - - "yes" - - --maxmemory - - "200mb" - - --maxmemory-policy - - allkeys-lru - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-data ---- -apiVersion: v1 -kind: Service -metadata: - name: redis - namespace: cannaiq -spec: - selector: - app: redis - ports: - - port: 6379 - targetPort: 6379 diff --git a/k8s/secrets.yaml b/k8s/secrets.yaml index e19a528a..04e03e14 100644 --- a/k8s/secrets.yaml +++ b/k8s/secrets.yaml @@ -5,12 +5,29 @@ metadata: namespace: cannaiq type: Opaque stringData: + # PostgreSQL (external: 10.100.6.50) POSTGRES_USER: "cannaiq" POSTGRES_PASSWORD: "SpDyCannaIQ2024" POSTGRES_DB: "cannaiq" DATABASE_URL: "postgresql://cannaiq:SpDyCannaIQ2024@10.100.6.50:5432/cannaiq" - JWT_SECRET: "aW7vN3xKpM9qLsT2fB5jDc8hR4wY6zXe" + + # Redis (external: 10.100.9.50) + REDIS_HOST: "10.100.9.50" + REDIS_PORT: "6379" + REDIS_PASSWORD: "SpDyR3d1s2024!" + REDIS_URL: "redis://:SpDyR3d1s2024!@10.100.9.50:6379" + + # MinIO (external: 10.100.9.80) + MINIO_ENDPOINT: "10.100.9.80" + MINIO_PORT: "9000" MINIO_ACCESS_KEY: "cannaiq-app" - MINIO_SECRET_KEY: "62a37268f2fe4163ef46fe1c29ad93f817b415fc" + MINIO_SECRET_KEY: "cannaiq-secret" + MINIO_BUCKET: "cannaiq" + MINIO_USE_SSL: "false" + + # Auth + JWT_SECRET: "aW7vN3xKpM9qLsT2fB5jDc8hR4wY6zXe" + + # Evomi Proxy EVOMI_USER: "kl8" EVOMI_PASS: "ogh9U1Xe7Gzxzozo4rmP"