Skip to content

Commit

Permalink
chore: enable sync mode for bio-admin
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Ruck <[email protected]>
  • Loading branch information
Manuel Ruck authored and ManAnRuck committed May 9, 2024
1 parent c4a64a8 commit 5fad2e2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
3 changes: 2 additions & 1 deletion bundestag.io/admin/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ NEXTAUTH_SECRET=secret
BIO_EDIT_TOKEN=""
AI_SERVER_URL=http://ai-votes:4003
AI_SERVER_URL_CODEGEN=http://localhost:4003
AI_ACCESS_TOKEN=EMPTY
AI_ACCESS_TOKEN=EMPTY
AI_SIMULATION=true
10 changes: 9 additions & 1 deletion bundestag.io/admin/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ include:
- ./infra/Dockerfile.service
spec:
dockerfile: ./infra/Dockerfile.service
targetStage:
$if: ${this.mode == "sync"}
$then: dev
$else: runner
buildArgs:
NODE_VERSION: 18.18.2
SERVICE: bundestag.io-admin
Expand All @@ -19,10 +23,12 @@ kind: Deploy
name: admin
type: kubernetes
description: Deploy the Admin
dependencies: [build.admin, deploy.bundestag-io-api]
dependencies: [build.admin, deploy.bundestag-io-api, deploy.votes-ai]

variables:
BIO_EDIT_TOKEN: ${actions.deploy.bundestag-io-api.var.BIO_EDIT_TOKEN}
AI_SERVICE_ACCESS_TOKEN: ${actions.deploy.votes-ai.var.ACCESS_TOKEN}
AI_SIMULATION: true

spec:
files: [./manifests/*] # <--- Tell Garden what manifests to use
Expand All @@ -36,6 +42,8 @@ spec:
- containerPath: /app/bundestag.io/admin/src
sourcePath: src
mode: one-way
overrides:
- command: [pnpm, dev]

# Patch the K8s manifests for the api service so that we can set the correct image
patchResources:
Expand Down
10 changes: 6 additions & 4 deletions bundestag.io/admin/manifests/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,19 @@ spec:
- name: BIO_EDIT_TOKEN
value: ${var.BIO_EDIT_TOKEN}
- name: AI_ACCESS_TOKEN
value: 'token'
value: ${var.AI_SERVICE_ACCESS_TOKEN}
- name: AI_SERVER_URL
value: 'http://ai'
value: 'http://votes-ai'
- name: AI_SIMULATION
value: '${var.AI_SIMULATION}'
ports:
- containerPort: 4003
name: http
protocol: TCP
resources:
limits:
cpu: '1'
memory: 1Gi
cpu: '4'
memory: 4Gi
requests:
cpu: 10m
memory: 90Mi

0 comments on commit 5fad2e2

Please sign in to comment.