Homepage/k8s/deployment.yaml
2025-09-05 14:19:04 +02:00

68 lines
1.8 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: homepage
namespace: homepage
labels:
app.kubernetes.io/name: homepage
spec:
revisionHistoryLimit: 3
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
selector:
matchLabels:
app.kubernetes.io/name: homepage
template:
metadata:
labels:
app.kubernetes.io/name: homepage
annotations:
kubectl.kubernetes.io/restartedAt: ""
spec:
serviceAccountName: homepage
automountServiceAccountToken: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
securityContext:
fsGroup: 1000
initContainers:
- name: copy-config
image: busybox:1.36
command: ['sh', '-c']
args:
- |
cp /config-source/* /app/config/ 2>/dev/null || true
chmod -R 644 /app/config/*.yaml
chmod -R 644 /app/config/*.js
chmod -R 644 /app/config/*.css
volumeMounts:
- mountPath: /config-source
name: homepage
- mountPath: /app/config
name: config-writable
containers:
- name: homepage
image: "ghcr.io/gethomepage/homepage:latest"
imagePullPolicy: Always
env:
- name: HOMEPAGE_ALLOWED_HOSTS
value: sortifal.fr # required, may need port. See gethomepage.dev/installation/#homepage_allowed_hosts
ports:
- name: http
containerPort: 3000
protocol: TCP
volumeMounts:
- mountPath: /app/config
name: config-writable
volumes:
- name: homepage
configMap:
name: homepage
- name: logs
emptyDir: {}
- name: config-writable
emptyDir: {}