From 095497ea0beaed5993b4dfcd16818c88d52c3796 Mon Sep 17 00:00:00 2001 From: ange Date: Thu, 16 May 2024 00:01:50 +0200 Subject: [PATCH] fix: config rw directory --- config/bookmarks.yaml | 1 - config/kubernetes.yaml | 2 ++ config/settings.yaml | 13 +++++++++++-- config/widgets.yaml | 2 +- manifests/bin/deploy.sh | 14 +++++++------- manifests/common/app.yaml | 21 ++++++++++++++++++--- 6 files changed, 39 insertions(+), 14 deletions(-) diff --git a/config/bookmarks.yaml b/config/bookmarks.yaml index bede0b4..0e1c384 100644 --- a/config/bookmarks.yaml +++ b/config/bookmarks.yaml @@ -1,3 +1,2 @@ --- -# For configuration options and examples, please see: # https://gethomepage.dev/latest/configs/bookmarks diff --git a/config/kubernetes.yaml b/config/kubernetes.yaml index 1854325..ecdb323 100644 --- a/config/kubernetes.yaml +++ b/config/kubernetes.yaml @@ -1,2 +1,4 @@ --- +# https://gethomepage.dev/latest/configs/kubernetes/ + mode: cluster diff --git a/config/settings.yaml b/config/settings.yaml index 558b50a..c679d6e 100644 --- a/config/settings.yaml +++ b/config/settings.yaml @@ -1,6 +1,15 @@ --- -# For configuration options and examples, please see: # https://gethomepage.dev/latest/configs/settings -headerStyle: clean instanceName: "$INSTANCE_NAME" +headerStyle: clean +target: _self + +layout: + Kubernetes: + header: false + +quicklaunch: + searchDescriptions: true + hideInternetSearch: false + showSearchSuggestions: true diff --git a/config/widgets.yaml b/config/widgets.yaml index cb4e9c6..eed764e 100644 --- a/config/widgets.yaml +++ b/config/widgets.yaml @@ -6,4 +6,4 @@ provider: custom url: https://searx.gmoker.com/search?q= suggestionUrl: https://searx.gmoker.com/autocompleter?q= - target: _blank + target: _self diff --git a/manifests/bin/deploy.sh b/manifests/bin/deploy.sh index ad9ae79..55e4e58 100755 --- a/manifests/bin/deploy.sh +++ b/manifests/bin/deploy.sh @@ -30,13 +30,13 @@ function kgcmkey() { kubectl get configmap "$cm" -o jsonpath="{.data.$key}" } -(cd config - cmd=(kcreatecm homepage-config) - for f in *; do - cmd+=("--from-file=$f=<(envsubst \"\$(env | xargs printf '$%s ')\" < $f)") - done - eval "${cmd[*]}" -) +kcreatecm homepage \ + --from-file=bookmarks.yaml =<(envsubst "$(env | xargs printf '$%s ')" < bookmarks.yaml) \ + --from-file=custom.css =<(envsubst "$(env | xargs printf '$%s ')" < custom.css) \ + --from-file=custom.js =<(envsubst "$(env | xargs printf '$%s ')" < custom.js) \ + --from-file=kubernetes.yaml=<(envsubst "$(env | xargs printf '$%s ')" < kubernetes.yaml) \ + --from-file=settings.yaml =<(envsubst "$(env | xargs printf '$%s ')" < settings.yaml) \ + --from-file=widgets.yaml =<(envsubst "$(env | xargs printf '$%s ')" < widgets.yaml) kapply common/clusterrole.yaml common/app.yaml diff --git a/manifests/common/app.yaml b/manifests/common/app.yaml index 4452027..76ff628 100644 --- a/manifests/common/app.yaml +++ b/manifests/common/app.yaml @@ -67,9 +67,24 @@ spec: value: stdout volumeMounts: - name: config - mountPath: /app/config/ - readOnly: true + mountPath: /app/config/bookmarks.yaml + subPath: bookmarks.yaml + - name: config + mountPath: /app/config/custom.css + subPath: custom.css + - name: config + mountPath: /app/config/custom.js + subPath: custom.js + - name: config + mountPath: /app/config/kubernetes.yaml + subPath: kubernetes.yaml + - name: config + mountPath: /app/config/settings.yaml + subPath: settings.yaml + - name: config + mountPath: /app/config/widgets.yaml + subPath: widgets.yaml volumes: - name: config configMap: - name: homepage-config + name: homepage