diff --git a/infrastructure/k8s/folio-feed-helm/templates/analyzer-deployment.yaml b/infrastructure/k8s/folio-feed-helm/templates/analyzer-deployment.yaml index 1d907ad..44bde82 100644 --- a/infrastructure/k8s/folio-feed-helm/templates/analyzer-deployment.yaml +++ b/infrastructure/k8s/folio-feed-helm/templates/analyzer-deployment.yaml @@ -60,10 +60,10 @@ spec: - name: GOOGLE_APPLICATION_CREDENTIALS value: /var/secrets/google/vertex-ai-key.json - name: RABBITMQ_HOST - value: folio-feed-rabbitmq.folio-feed.svc.cluster.local + value: folio-feed-rabbitmq.rabbitmq.svc.cluster.local - name: RABBITMQ_PORT value: '5672' - - name: RABBITMQ_USER + - name: RABBITMQ_USERNAME value: "user" - name: RABBITMQ_PASSWORD valueFrom: @@ -72,4 +72,6 @@ spec: key: rabbitmq-password - name: RABBITMQ_QUEUE value: news + resources: + {{- toYaml .Values.analyzer.resources | nindent 12 }} diff --git a/infrastructure/k8s/folio-feed-helm/templates/fetcher-cron.yaml b/infrastructure/k8s/folio-feed-helm/templates/fetcher-cron.yaml index 54332bd..452338a 100644 --- a/infrastructure/k8s/folio-feed-helm/templates/fetcher-cron.yaml +++ b/infrastructure/k8s/folio-feed-helm/templates/fetcher-cron.yaml @@ -14,6 +14,8 @@ spec: backoffLimit: 0 template: spec: + nodeSelector: + {{- toYaml .Values.fetcher.nodeSelector | nindent 10 }} containers: - name: fetcher {{- with .Values.fetcher.image }} @@ -42,9 +44,11 @@ spec: secretKeyRef: name: marketaux-api-secret key: marketaux-api-secret-key + - name: RABBITMQ_HOST + value: folio-feed-rabbitmq.rabbitmq.svc.cluster.local - name: RABBITMQ_PORT value: '5672' - - name: RABBITMQ_USER + - name: RABBITMQ_USERNAME value: "user" - name: RABBITMQ_PASSWORD valueFrom: @@ -53,4 +57,6 @@ spec: key: rabbitmq-password - name: RABBITMQ_QUEUE value: news + resources: + {{- toYaml .Values.fetcher.resources | nindent 14 }} restartPolicy: Never diff --git a/infrastructure/k8s/folio-feed-helm/values.yaml b/infrastructure/k8s/folio-feed-helm/values.yaml index 13efaf4..1a55fe4 100644 --- a/infrastructure/k8s/folio-feed-helm/values.yaml +++ b/infrastructure/k8s/folio-feed-helm/values.yaml @@ -55,6 +55,16 @@ fetcher: repository: folio-feed-fetcher tag: &fetcherImageTag 4bd0eb6d467033ebfe50555b88b3b7c0a49909a0 + nodeSelector: + cloud.google.com/gke-spot: "true" + cloud.google.com/compute-class: Scale-Out + + resources: + # GKE Autopilot only considers requests. limits are same as requests. + requests: + cpu: 250m + memory: 512Mi + analyzer: image: @@ -67,16 +77,33 @@ analyzer: cloud.google.com/gke-spot: "true" cloud.google.com/compute-class: Scale-Out + resources: + # GKE Autopilot only considers requests. limits are same as requests. + requests: + cpu: 250m + memory: 512Mi + rabbitmq: + namespaceOverride: "rabbitmq" replicaCount: 1 persistence: storageClass: "premium-rwo" size: 5Gi nodeSelector: cloud.google.com/gke-spot: "true" + cloud.google.com/compute-class: Scale-Out + auth: + username: user + existingPasswordSecret: folio-feed-rabbitmq + existingErlangCookieSecret: folio-feed-rabbitmq + resources: + # GKE Autopilot only considers requests. limits are same as requests. + requests: + cpu: 250m + memory: 512Mi postgresql: global: