Skip to content

Commit

Permalink
feat: add vertex ai key for analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
Gowtham1729 committed Dec 12, 2023
1 parent 5b4843d commit 455d2e0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
16 changes: 16 additions & 0 deletions infrastructure/k8s/folio-feed-helm/templates/analyzer-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ spec:
spec:
template:
spec:
volumes:
- name: google-cloud-key
secret:
secretName: vertex-ai-key
containers:
- name: analyzer
{{- with .Values.analyzer.image }}
Expand All @@ -20,6 +24,10 @@ spec:
- python
- analyzer.py
- analyze
volumeMounts:
- name: google-cloud-key
mountPath: /var/secrets/google
readOnly: true
env:
- name: DB_HOST
value: folio-feed-postgresql.folio-feed.svc.cluster.local
Expand All @@ -34,4 +42,12 @@ spec:
secretKeyRef:
name: postgresql-password
key: postgres-password
- name: GCP_PROJECT
value: {{ .Values.gcp.project }}
- name: GCP_LOCATION
value: {{ .Values.gcp.location }}
- name: MODEL_NAME
value: {{ .Values.analyzer.modelName }}
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
restartPolicy: Never
5 changes: 5 additions & 0 deletions infrastructure/k8s/folio-feed-helm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
environment: "prod"

gcp:
project: folio-feed-403709
region: us-central1

backend:
image:
registry: us-central1-docker.pkg.dev/folio-feed-403709/image-registry
Expand Down Expand Up @@ -57,6 +61,7 @@ analyzer:
registry: us-central1-docker.pkg.dev/folio-feed-403709/image-registry
repository: folio-feed-analyzer
tag: &analyzerImageTag d4cf25ba7d33f750b9e9c2528530a6050ff01789
modelName: "text-bison"



Expand Down

0 comments on commit 455d2e0

Please sign in to comment.