apps/linkwarden/resources/deployment.yaml

92 lines
2.4 KiB
YAML
Raw Normal View History

2023-12-21 13:56:26 +00:00
---
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: "1500Mi"
2023-12-21 13:56:26 +00:00
cpu: "500m"
readinessProbe:
httpGet:
path: /login
port: 3000
initialDelaySeconds: 15
periodSeconds: 10
livenessProbe:
httpGet:
path: /login
port: 3000
initialDelaySeconds: 30
periodSeconds: 10
2023-12-21 13:56:26 +00:00
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