apps/vikunja/resources/api/deployment.yaml

83 lines
2.4 KiB
YAML
Raw Normal View History

2023-11-14 21:12:33 +00:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: vikunja-api
spec:
strategy:
type: Recreate
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
valueFrom:
secretKeyRef:
name: default-cluster-pguser-vikunja
key: host
- name: VIKUNJA_DATABASE_DATABASE
valueFrom:
secretKeyRef:
name: default-cluster-pguser-vikunja
key: dbname
- name: VIKUNJA_DATABASE_USER
valueFrom:
secretKeyRef:
name: default-cluster-pguser-vikunja
key: user
- name: VIKUNJA_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: default-cluster-pguser-vikunja
key: password
ports:
- containerPort: 3456
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
privileged: false
resources:
limits:
memory: "384Mi"
cpu: "100m"
volumeMounts:
- name: vikunja-config
mountPath: /etc/vikunja
- name: vikunja-content
mountPath: /app/vikunja/files
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsUser: 1000
runAsNonRoot: false
volumes:
- name: vikunja-config
secret:
secretName: vikunja-config
- name: vikunja-content
persistentVolumeClaim:
claimName: vikunja-content