98 lines
2.8 KiB
YAML
98 lines
2.8 KiB
YAML
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: calendars-caldav
|
||
|
|
namespace: lasuite
|
||
|
|
spec:
|
||
|
|
replicas: 1
|
||
|
|
selector:
|
||
|
|
matchLabels:
|
||
|
|
app: calendars-caldav
|
||
|
|
template:
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
app: calendars-caldav
|
||
|
|
spec:
|
||
|
|
initContainers:
|
||
|
|
- name: init-database
|
||
|
|
image: calendars-caldav
|
||
|
|
command: ["/usr/local/bin/init-database.sh"]
|
||
|
|
env:
|
||
|
|
- name: PGHOST
|
||
|
|
valueFrom:
|
||
|
|
configMapKeyRef:
|
||
|
|
name: lasuite-postgres
|
||
|
|
key: DB_HOST
|
||
|
|
- name: PGPORT
|
||
|
|
valueFrom:
|
||
|
|
configMapKeyRef:
|
||
|
|
name: lasuite-postgres
|
||
|
|
key: DB_PORT
|
||
|
|
- name: PGDATABASE
|
||
|
|
value: calendars_db
|
||
|
|
- name: PGUSER
|
||
|
|
value: calendars
|
||
|
|
- name: PGPASSWORD
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: calendars-db-credentials
|
||
|
|
key: password
|
||
|
|
resources:
|
||
|
|
limits:
|
||
|
|
memory: 128Mi
|
||
|
|
cpu: 100m
|
||
|
|
requests:
|
||
|
|
memory: 64Mi
|
||
|
|
cpu: 10m
|
||
|
|
containers:
|
||
|
|
- name: calendars-caldav
|
||
|
|
image: calendars-caldav
|
||
|
|
ports:
|
||
|
|
- containerPort: 80
|
||
|
|
env:
|
||
|
|
- name: PGHOST
|
||
|
|
valueFrom:
|
||
|
|
configMapKeyRef:
|
||
|
|
name: lasuite-postgres
|
||
|
|
key: DB_HOST
|
||
|
|
- name: PGPORT
|
||
|
|
valueFrom:
|
||
|
|
configMapKeyRef:
|
||
|
|
name: lasuite-postgres
|
||
|
|
key: DB_PORT
|
||
|
|
- name: PGDATABASE
|
||
|
|
value: calendars_db
|
||
|
|
- name: PGUSER
|
||
|
|
value: calendars
|
||
|
|
- name: PGPASSWORD
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: calendars-db-credentials
|
||
|
|
key: password
|
||
|
|
- name: CALDAV_INBOUND_API_KEY
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: calendars-django-secret
|
||
|
|
key: CALDAV_INBOUND_API_KEY
|
||
|
|
- name: CALDAV_OUTBOUND_API_KEY
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: calendars-django-secret
|
||
|
|
key: CALDAV_OUTBOUND_API_KEY
|
||
|
|
- name: CALDAV_INTERNAL_API_KEY
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: calendars-django-secret
|
||
|
|
key: CALDAV_INTERNAL_API_KEY
|
||
|
|
- name: CALDAV_BASE_URI
|
||
|
|
value: /caldav/
|
||
|
|
- name: CALLBACK_BASE_URL
|
||
|
|
value: http://calendars-backend.lasuite.svc.cluster.local:8000
|
||
|
|
resources:
|
||
|
|
limits:
|
||
|
|
memory: 256Mi
|
||
|
|
cpu: 300m
|
||
|
|
requests:
|
||
|
|
memory: 128Mi
|
||
|
|
cpu: 50m
|