Skip to content

Commit

Permalink
add non-named-votes-ai
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Ruck <[email protected]>
  • Loading branch information
Manuel Ruck committed Aug 12, 2024
1 parent ad65799 commit 9f1ded4
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 2 deletions.
4 changes: 3 additions & 1 deletion kustomize/base/main/bundestagio-admin-depl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: bundestagio-admin
image: democracy/bundestag.io-admin:3.3.0
image: democracy/bundestag.io-admin:pr-592
env:
- name: AI_ACCESS_TOKEN
valueFrom:
Expand All @@ -29,6 +29,8 @@ spec:
name: bio-admin-login
- secretRef:
name: bundestag-result-edit-token
- secretRef:
name: non-named-votes-ai-access-token
resources:
limits:
memory: "200M"
Expand Down
1 change: 1 addition & 0 deletions kustomize/base/main/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
- bundestagio-admin-depl.yaml
- bundestagio-depl.yaml
- votes-ai.yaml
- non-named-votes-ai.yaml
- bundestagio-dip-depl.yaml
- democracy-api-depl.yaml
- democracy-app-depl.yaml
Expand Down
56 changes: 56 additions & 0 deletions kustomize/base/main/non-named-votes-ai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: non-named-votes-ai
spec:
replicas: 1
selector:
matchLabels:
app: non-named-votes-ai
template:
metadata:
labels:
app: non-named-votes-ai
spec:
containers:
- name: non-named-votes-ai
image: democracy/non-named-votes-ai:pr-592
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3005
protocol: TCP
env:
- name: DB_URL
valueFrom:
configMapKeyRef:
name: bio-api-config
key: DB_URL
envFrom:
- configMapRef:
name: non-named-votes-ai-config
- secretRef:
name: non-named-votes-ai-access-token
optional: false
- secretRef:
name: non-named-votes-ai-openai-token
optional: false
resources:
requests:
memory: "150M"
cpu: "50m"
limits:
memory: "200M"
cpu: "300m"
---
apiVersion: v1
kind: Service
metadata:
name: non-named-votes-ai-srv
spec:
selector:
app: non-named-votes-ai
ports:
- name: non-named-votes-ai
protocol: TCP
port: 3005
targetPort: 3005
3 changes: 2 additions & 1 deletion kustomize/overlays/internal/configs/bio-admin.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
BUNDESTAGIO_SERVER_URL=http://bundestagio-srv:3100/
NEXTAUTH_URL=https://internal.admin.bundestag.io
AI_SERVER_URL=http://votes-ai-srv:4003
AI_SERVER_URL=http://votes-ai-srv:4003
NON_NAMED_VOTES_AI_SERVER_URL=http://non-named-votes-ai-srv:3005
3 changes: 3 additions & 0 deletions kustomize/overlays/internal/configs/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ configMapGenerator:
- name: ai-votes-config
envs:
- ai-votes.env
- name: non-named-votes-ai-config
envs:
- non-named-votes-ai.env
- name: bio-api-config
envs:
- bio-api.env
Expand Down
3 changes: 3 additions & 0 deletions kustomize/overlays/internal/configs/non-named-votes-ai.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PORT=3005
PINO_LOG_LEVEL=info
ALLOWED_DOMAINS=https://dserver.bundestag.de
10 changes: 10 additions & 0 deletions kustomize/overlays/internal/yamls/non-named-votes-ai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: non-named-votes-ai
spec:
template:
spec:
containers:
- name: non-named-votes-ai
imagePullPolicy: Always
1 change: 1 addition & 0 deletions kustomize/overlays/production/configs/bio-admin.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
BUNDESTAGIO_SERVER_URL=http://bundestagio-srv:3100/
NEXTAUTH_URL=https://admin.bundestag.io
AI_SERVER_URL=http://votes-ai-srv:4003
NON_NAMED_VOTES_AI_SERVER_URL=http://non-named-votes-ai-srv:3005
3 changes: 3 additions & 0 deletions kustomize/overlays/production/configs/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ configMapGenerator:
- name: ai-votes-config
envs:
- ai-votes.env
- name: non-named-votes-ai-config
envs:
- non-named-votes-ai.env
- name: bio-api-config
envs:
- bio-api.env
Expand Down
3 changes: 3 additions & 0 deletions kustomize/overlays/production/configs/non-named-votes-ai.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PORT=3005
PINO_LOG_LEVEL=info
ALLOWED_DOMAINS=https://dserver.bundestag.de

0 comments on commit 9f1ded4

Please sign in to comment.