apps/vikunja/resources/api/deployment.yaml

96 lines
2.8 KiB
YAML
Raw Normal View History

2023-11-14 21:12:33 +00:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: vikunja-api
spec:
replicas: 2
2023-11-14 21:12:33 +00:00
selector:
matchLabels:
app.kubernetes.io/name: vikunja
app.kubernetes.io/component: api
app.kubernetes.io/part-of: vikunja
template:
metadata:
labels:
app.kubernetes.io/name: vikunja
app.kubernetes.io/component: api
app.kubernetes.io/part-of: vikunja
spec:
containers:
- name: vikunja-api
image: vikunja-api
command:
- /app/vikunja/vikunja
env:
- name: VIKUNJA_DATABASE_TYPE
value: postgres
- name: VIKUNJA_SERVICE_FRONTENDURL
value: https://todo.icb4dc0.de
- name: VIKUNJA_DATABASE_SSLMODE
value: require
- name: VIKUNJA_DATABASE_HOST
2024-08-20 18:53:24 +00:00
value: app-cluster-pooler-rw.postgres.svc
2023-11-14 21:12:33 +00:00
- name: VIKUNJA_DATABASE_DATABASE
valueFrom:
secretKeyRef:
2024-08-16 13:12:05 +00:00
name: db-credentials-vikunja
key: DATABASE_NAME
2023-11-14 21:12:33 +00:00
- name: VIKUNJA_DATABASE_USER
valueFrom:
secretKeyRef:
2024-08-16 13:12:05 +00:00
name: db-credentials-vikunja
key: LOGIN
2023-11-14 21:12:33 +00:00
- name: VIKUNJA_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
2024-08-16 13:12:05 +00:00
name: db-credentials-vikunja
key: PASSWORD
2024-05-09 13:16:35 +00:00
- name: GOMEMLIMIT
valueFrom:
resourceFieldRef:
resource: limits.memory
2023-11-14 21:12:33 +00:00
ports:
- containerPort: 3456
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
privileged: false
resources:
2024-05-09 13:16:35 +00:00
requests:
memory: 30Mi
cpu: 20m
2023-11-14 21:12:33 +00:00
limits:
2024-05-09 13:16:35 +00:00
memory: "100Mi"
cpu: "50m"
2023-11-14 21:12:33 +00:00
volumeMounts:
- name: vikunja-config
mountPath: /etc/vikunja
- name: vikunja-content
mountPath: /app/vikunja/files
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsUser: 1000
runAsNonRoot: false
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- arm64
2023-11-14 21:12:33 +00:00
volumes:
- name: vikunja-config
secret:
2024-04-27 10:29:44 +00:00
secretName: vikunja-api-config
2023-11-14 21:12:33 +00:00
- name: vikunja-content
persistentVolumeClaim:
claimName: vikunja-content