apps/linkwarden/resources/deployment.yaml
Peter Kurfer ceca1f3bc9
All checks were successful
Renovate / renovate (push) Successful in 16s
feat: add linkwarden
2023-12-21 14:56:49 +01:00

80 lines
No EOL
2.1 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: linkwarden
labels:
app.kubernetes.io/name: linkwarden
spec:
selector:
matchLabels:
app.kubernetes.io/name: linkwarden
replicas: 1
template:
metadata:
labels:
app.kubernetes.io/name: linkwarden
spec:
initContainers:
- name: install-packages
image: linkwarden
command: ["/bin/bash", "-c", "npx playwright install"]
volumeMounts:
- name: node-cache
mountPath: /home/node/.cache
containers:
- name: linkwarden
image: linkwarden
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: default-cluster-pguser-linkwarden
key: uri
envFrom:
- secretRef:
name: linkwarden-config
ports:
- containerPort: 3000
protocol: TCP
name: web
volumeMounts:
- name: next-cache
mountPath: /data/.next/cache
- name: node-cache
mountPath: /home/node/.cache
resources:
requests:
memory: "384Mi"
cpu: "50m"
limits:
memory: "768Mi"
cpu: "500m"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- arm64
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
runAsNonRoot: true
volumes:
- name: next-cache
emptyDir:
sizeLimit: 250Mi
- name: node-cache
emptyDir:
sizeLimit: 1500Mi