From a58bd673e8aacecafa5c4399f02a1d3f86796b9a Mon Sep 17 00:00:00 2001 From: Alexis Bruneteau Date: Thu, 4 Sep 2025 17:59:05 +0200 Subject: [PATCH] fixed deployment for config --- k8s/deployment.yaml | 45 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index 80f65cf..c91c481 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -24,6 +24,21 @@ spec: 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-config + - mountPath: /app/config + name: config-writable containers: - name: homepage image: "ghcr.io/gethomepage/homepage:latest" @@ -36,35 +51,13 @@ spec: 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/services.yaml - name: homepage-config - 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/config + name: config-writable volumes: - name: homepage-config configMap: name: homepage-config - name: logs + emptyDir: {} + - name: config-writable emptyDir: {} \ No newline at end of file