Skip to content

Commit

Permalink
chore: gardening more services
Browse files Browse the repository at this point in the history
- democracy-api
- qr-code-handler
- all cron-jobs

Signed-off-by: Manuel Ruck <[email protected]>
  • Loading branch information
Manuel Ruck committed May 1, 2024
1 parent a087100 commit cb92fbd
Show file tree
Hide file tree
Showing 69 changed files with 1,309 additions and 237 deletions.
6 changes: 6 additions & 0 deletions infra/democracy-api/garden.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Deploy
name: democracy-api
type: kubernetes
spec:
files:
- ./manifests/*
14 changes: 14 additions & 0 deletions infra/democracy-api/manifests/ConfigMap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

apiVersion: v1
kind: ConfigMap
metadata:
name: democracy-api-config
data:
BUNDESTAGIO_SERVER_URL: http://bundestagio-srv:3100/
DB_URL: mongodb://democracy-mongo:27017/democracy
DEBUG: "true"
GRAPHIQL: "true"
NODE_ENV: development
SMS_SIMULATE: "true"
SMS_VERIFICATION: "false"
STAGE: internal
31 changes: 31 additions & 0 deletions infra/democracy-api/manifests/Deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: democracy-api
labels:
app: democracy-api
spec:
selector:
matchLabels:
app: democracy-api
template:
metadata:
labels:
app: democracy-api
spec:
containers:
- name: democracy-api
image: democracy/democracy-server:0.2.64
ports:
- containerPort: 3000
envFrom:
- configMapRef:
name: democracy-api-config
optional: false
- secretRef:
name: democracy-api-secrets
optional: false
resources:
limits:
cpu: '0.5'
memory: '512Mi'
19 changes: 19 additions & 0 deletions infra/democracy-api/manifests/Ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: democracy-api
labels:
app: democracy-api
spec:
ingressClassName: nginx
rules:
- host: 'democracy-api.${var.hostname}'
http:
paths:
- backend:
service:
name: democracy-api
port:
number: 80
path: /
pathType: Prefix
5 changes: 5 additions & 0 deletions infra/democracy-api/manifests/Secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: Secret
metadata:
name: democracy-api-secrets
type: Opaque
15 changes: 15 additions & 0 deletions infra/democracy-api/manifests/Service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: democracy-api
name: democracy-api
spec:
type: ClusterIP
selector:
app: democracy-api
ports:
- name: http
protocol: TCP
port: 80
targetPort: 3000
3 changes: 1 addition & 2 deletions infra/mongo/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ name: mongo
type: kubernetes
spec:
files:
- ./manifests/Deployment.yaml
- ./manifests/Service.yaml
- ./manifests/*
Loading

0 comments on commit cb92fbd

Please sign in to comment.