From 4c42bbb4b9c8ba842684865419a3629ad8c44a2e Mon Sep 17 00:00:00 2001 From: David Landry Date: Wed, 8 May 2024 01:25:01 -0400 Subject: [PATCH] chore(dashboard): move config into separate files --- apps/gethomepage/base/config/bookmarks.yaml | 4 + apps/gethomepage/base/config/custom.css | 0 apps/gethomepage/base/config/custom.js | 0 .../base/{ => config}/icons/fvtt-d20.png | Bin apps/gethomepage/base/config/services.yaml | 6 ++ apps/gethomepage/base/config/settings.yaml | 12 +++ apps/gethomepage/base/config/widgets.yaml | 29 +++++++ apps/gethomepage/base/configmap.yaml | 71 ------------------ apps/gethomepage/base/kustomization.yaml | 14 ++++ 9 files changed, 65 insertions(+), 71 deletions(-) create mode 100644 apps/gethomepage/base/config/bookmarks.yaml create mode 100644 apps/gethomepage/base/config/custom.css create mode 100644 apps/gethomepage/base/config/custom.js rename apps/gethomepage/base/{ => config}/icons/fvtt-d20.png (100%) create mode 100644 apps/gethomepage/base/config/services.yaml create mode 100644 apps/gethomepage/base/config/settings.yaml create mode 100644 apps/gethomepage/base/config/widgets.yaml delete mode 100644 apps/gethomepage/base/configmap.yaml diff --git a/apps/gethomepage/base/config/bookmarks.yaml b/apps/gethomepage/base/config/bookmarks.yaml new file mode 100644 index 0000000..4880c99 --- /dev/null +++ b/apps/gethomepage/base/config/bookmarks.yaml @@ -0,0 +1,4 @@ +- Developer: + - Github: + - abbr: GH + href: https://github.com/ diff --git a/apps/gethomepage/base/config/custom.css b/apps/gethomepage/base/config/custom.css new file mode 100644 index 0000000..e69de29 diff --git a/apps/gethomepage/base/config/custom.js b/apps/gethomepage/base/config/custom.js new file mode 100644 index 0000000..e69de29 diff --git a/apps/gethomepage/base/icons/fvtt-d20.png b/apps/gethomepage/base/config/icons/fvtt-d20.png similarity index 100% rename from apps/gethomepage/base/icons/fvtt-d20.png rename to apps/gethomepage/base/config/icons/fvtt-d20.png diff --git a/apps/gethomepage/base/config/services.yaml b/apps/gethomepage/base/config/services.yaml new file mode 100644 index 0000000..c35c17f --- /dev/null +++ b/apps/gethomepage/base/config/services.yaml @@ -0,0 +1,6 @@ +layout: + Files: + Media: + Games: + Manage Homelab: + Manage Media: diff --git a/apps/gethomepage/base/config/settings.yaml b/apps/gethomepage/base/config/settings.yaml new file mode 100644 index 0000000..c8fa27d --- /dev/null +++ b/apps/gethomepage/base/config/settings.yaml @@ -0,0 +1,12 @@ +layout: + Games: + columns: 4 + style: row + Manage Library: + columns: 4 + style: row + Files: + Manage Homelab: + Media: + columns: 4 + style: row diff --git a/apps/gethomepage/base/config/widgets.yaml b/apps/gethomepage/base/config/widgets.yaml new file mode 100644 index 0000000..891a79a --- /dev/null +++ b/apps/gethomepage/base/config/widgets.yaml @@ -0,0 +1,29 @@ +- datetime: + format: + dateStyle: long + hour12: true + timeStyle: short + text_size: xl + +- kubernetes: + cluster: + show: true + cpu: true + memory: true + showLabel: true + label: "cluster" + nodes: + show: true + cpu: true + memory: true + showLabel: true + +- resources: + backend: resources + expanded: true + cpu: true + memory: true + +- search: + provider: duckduckgo + target: _blank diff --git a/apps/gethomepage/base/configmap.yaml b/apps/gethomepage/base/configmap.yaml deleted file mode 100644 index 101ec38..0000000 --- a/apps/gethomepage/base/configmap.yaml +++ /dev/null @@ -1,71 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: homepage - labels: - app.kubernetes.io/name: homepage -data: - bookmarks.yaml: | - - Developer: - - Github: - - abbr: GH - href: https://github.com/ - - kubernetes.yaml: | - mode: cluster - - services.yaml: | - layout: - Files: - Media: - Games: - Manage Homelab: - Manage Media: - - settings.yaml: | - layout: - Games: - columns: 4 - style: row - Manage Library: - columns: 4 - style: row - Files: - Manage Homelab: - Media: - columns: 4 - style: row - - custom.css: "" - - custom.js: "" - - widgets.yaml: | - - datetime: - format: - dateStyle: long - hour12: true - timeStyle: short - text_size: xl - - - kubernetes: - cluster: - show: true - cpu: true - memory: true - showLabel: true - label: "cluster" - nodes: - show: true - cpu: true - memory: true - showLabel: true - - resources: - backend: resources - expanded: true - cpu: true - memory: true - - search: - provider: duckduckgo - target: _blank - docker.yaml: "" diff --git a/apps/gethomepage/base/kustomization.yaml b/apps/gethomepage/base/kustomization.yaml index 500d65c..4d011df 100644 --- a/apps/gethomepage/base/kustomization.yaml +++ b/apps/gethomepage/base/kustomization.yaml @@ -9,6 +9,20 @@ resources: - secret.yaml - service.yaml +configMapGenerator + - name: homepage + literals: + - | + kubernetes.yaml= + mode: cluster + files: + - custom.js=./config/custom.js + - custom.css=./config/custom.css + - bookmarks.yaml=./config/bookmarks.yaml + - services.yaml=./config/services.yaml + - settings.yaml=./config/settings.yaml + - widgets.yaml=./config/widgets.yaml + secretGenerator: - name: basic-auth files: