2024-04-29 14:52:48 +00:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: umami
|
|
|
|
spec:
|
2024-10-10 19:33:02 +00:00
|
|
|
replicas: 1
|
2024-04-29 14:52:48 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app.kubernetes.io/name: umami
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: umami
|
|
|
|
spec:
|
2024-04-30 13:54:31 +00:00
|
|
|
initContainers:
|
|
|
|
- name: init-db
|
|
|
|
image: umami
|
|
|
|
command:
|
|
|
|
- /app/node_modules/.bin/npm-run-all
|
|
|
|
args:
|
|
|
|
- check-db
|
|
|
|
- update-tracker
|
|
|
|
env:
|
|
|
|
- name: DATABASE_URL
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
2024-10-10 19:33:02 +00:00
|
|
|
name: default-cluster-pguser-umami
|
2024-08-16 11:20:59 +00:00
|
|
|
key: PQ_URL
|
2024-04-30 13:54:31 +00:00
|
|
|
envFrom:
|
|
|
|
- configMapRef:
|
|
|
|
name: umami-config
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
memory: "256Mi"
|
|
|
|
cpu: "150m"
|
|
|
|
limits:
|
|
|
|
memory: "384Mi"
|
|
|
|
cpu: "250m"
|
2024-04-30 14:06:15 +00:00
|
|
|
securityContext:
|
|
|
|
allowPrivilegeEscalation: false
|
|
|
|
capabilities:
|
|
|
|
drop:
|
|
|
|
- ALL
|
|
|
|
readOnlyRootFilesystem: true
|
2024-04-29 14:52:48 +00:00
|
|
|
containers:
|
2024-04-30 13:54:31 +00:00
|
|
|
- name: umami
|
|
|
|
image: umami
|
|
|
|
args:
|
|
|
|
- node
|
|
|
|
- server.js
|
|
|
|
env:
|
|
|
|
- name: DATABASE_URL
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
2024-08-16 11:20:59 +00:00
|
|
|
name: db-credentials-umami
|
|
|
|
key: PQ_URL
|
2024-04-30 13:54:31 +00:00
|
|
|
envFrom:
|
|
|
|
- configMapRef:
|
|
|
|
name: umami-config
|
|
|
|
resources:
|
|
|
|
requests:
|
2024-04-30 14:06:15 +00:00
|
|
|
memory: "64Mi"
|
|
|
|
cpu: "150m"
|
2024-04-30 13:54:31 +00:00
|
|
|
limits:
|
2024-04-30 14:06:15 +00:00
|
|
|
memory: "256Mi"
|
|
|
|
cpu: "300m"
|
2024-04-30 13:54:31 +00:00
|
|
|
ports:
|
2024-10-10 19:33:02 +00:00
|
|
|
- containerPort: 3000
|
|
|
|
protocol: TCP
|
|
|
|
name: web
|
2024-04-30 13:54:31 +00:00
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /api/heartbeat
|
|
|
|
port: 3000
|
|
|
|
initialDelaySeconds: 15
|
|
|
|
periodSeconds: 20
|
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /api/heartbeat
|
|
|
|
port: 3000
|
|
|
|
initialDelaySeconds: 5
|
|
|
|
periodSeconds: 10
|
|
|
|
securityContext:
|
|
|
|
allowPrivilegeEscalation: false
|
|
|
|
capabilities:
|
|
|
|
drop:
|
|
|
|
- ALL
|
2024-04-30 14:06:15 +00:00
|
|
|
readOnlyRootFilesystem: true
|
2024-04-29 14:52:48 +00:00
|
|
|
affinity:
|
|
|
|
nodeAffinity:
|
|
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
- weight: 100
|
|
|
|
preference:
|
|
|
|
matchExpressions:
|
|
|
|
- key: kubernetes.io/arch
|
|
|
|
operator: In
|
|
|
|
values:
|
|
|
|
- arm64
|
|
|
|
securityContext:
|
|
|
|
runAsUser: 1000
|
|
|
|
runAsGroup: 1000
|
2024-10-10 19:33:02 +00:00
|
|
|
runAsNonRoot: true
|