96 lines
2.8 KiB
YAML
96 lines
2.8 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: homepage
|
|
namespace: monitoring
|
|
labels:
|
|
app.kubernetes.io/name: homepage
|
|
spec:
|
|
revisionHistoryLimit: 3
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: homepage
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: homepage
|
|
spec:
|
|
serviceAccountName: homepage
|
|
automountServiceAccountToken: true
|
|
enableServiceLinks: true
|
|
initContainers:
|
|
- name: substitute-config
|
|
image: alpine
|
|
envFrom:
|
|
- secretRef:
|
|
name: homepage-secrets
|
|
command:
|
|
- "sh"
|
|
- "-c"
|
|
- apk add gettext && envsubst < /mnt/init/services.yaml > /mnt/services.yaml
|
|
volumeMounts:
|
|
- name: homepage-config
|
|
mountPath: /mnt/init/services.yaml
|
|
subPath: services.yaml
|
|
- name: tmp
|
|
mountPath: /mnt
|
|
subPath: services.yaml
|
|
containers:
|
|
- name: homepage
|
|
image: "ghcr.io/gethomepage/homepage:v1.7.0"
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: HOMEPAGE_ALLOWED_HOSTS
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: homepage-secrets
|
|
key: ALLOWED_HOSTS
|
|
ports:
|
|
- name: http
|
|
containerPort: 3000
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- mountPath: /app/config/custom.js
|
|
name: homepage-config
|
|
subPath: custom.js
|
|
- mountPath: /app/config/custom.css
|
|
name: homepage-config
|
|
subPath: custom.css
|
|
- mountPath: /app/config/bookmarks.yaml
|
|
name: homepage-config
|
|
subPath: bookmarks.yaml
|
|
- mountPath: /app/config/docker.yaml
|
|
name: homepage-config
|
|
subPath: docker.yaml
|
|
- mountPath: /app/config/kubernetes.yaml
|
|
name: homepage-config
|
|
subPath: kubernetes.yaml
|
|
- mountPath: /app/config
|
|
name: tmp
|
|
subPath: services.yaml
|
|
- mountPath: /app/config/settings.yaml
|
|
name: homepage-config
|
|
subPath: settings.yaml
|
|
- mountPath: /app/config/widgets.yaml
|
|
name: homepage-config
|
|
subPath: widgets.yaml
|
|
- mountPath: /app/config/logs
|
|
name: logs
|
|
- mountPath: /app/public/images
|
|
name: images
|
|
volumes:
|
|
- name: homepage-config
|
|
configMap:
|
|
name: homepage
|
|
- name: images
|
|
persistentVolumeClaim:
|
|
claimName: homepage-longhorn
|
|
- name: logs
|
|
emptyDir: {}
|
|
- name: tmp
|
|
emptyDir: {}
|