From c3c8c4d509f266a90b410579a1b2c77212bdf27b Mon Sep 17 00:00:00 2001 From: Sebastian Leheis Date: Wed, 20 Sep 2023 17:44:28 +0200 Subject: [PATCH 1/2] dashboard - added base config for dashboard --- dashboard/dashboard.yaml | 288 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 288 insertions(+) create mode 100644 dashboard/dashboard.yaml diff --git a/dashboard/dashboard.yaml b/dashboard/dashboard.yaml new file mode 100644 index 0000000..a9fb723 --- /dev/null +++ b/dashboard/dashboard.yaml @@ -0,0 +1,288 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: dashboard +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: dashboard-data + namespace: dashboard +data: + greeter.json: | + { + "greeter": { + "months": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "days": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "greetings": [ + { + "greeting": "Good night!", + "start": 0, + "end": 6 + }, + { + "greeting": "Good morning!", + "start": 6, + "end": 12 + }, + { + "greeting": "Good afternoon!", + "start": 12, + "end": 18 + }, + { + "greeting": "Good evening!", + "start": 18, + "end": 24 + } + ], + "dateformat": "%wd, %m %d%e %y" + } + } + themes.json: | + { + "themes": [ + { + "label": "Classic", + "value": 0, + "mainColor": "#000000", + "accentColor": "#1e272e", + "backgroundColor": "#ffffff" + }, + { + "label": "Dark", + "value": 1, + "mainColor": "#ffffff", + "accentColor": "#999999", + "backgroundColor": "#000000" + }, + { + "label": "Raw", + "value": 2, + "mainColor": "", + "accentColor": "", + "backgroundColor": "#ffffff" + }, + { + "label": "Blackboard", + "value": 3, + "mainColor": "#fffdea", + "accentColor": "#5c5c5c", + "backgroundColor": "#1a1a1a" + }, + { + "label": "Gazette", + "value": 4, + "mainColor": "#000000", + "accentColor": "#5c5c5c", + "backgroundColor": "#F2F7FF" + }, + { + "label": "Espresso", + "value": 5, + "mainColor": "#d1b59a", + "accentColor": "#4e4e4e", + "backgroundColor": "#21211f" + }, + { + "label": "Cab", + "value": 6, + "mainColor": "#1f1f1f", + "accentColor": "#424242", + "backgroundColor": "#f6d305" + }, + { + "label": "Cloud", + "value": 7, + "mainColor": "#35342f", + "accentColor": "#37bbe4", + "backgroundColor": "#f1f2f0" + }, + { + "label": "Lime", + "value": 8, + "mainColor": "#aabbc3", + "accentColor": "#aeea00", + "backgroundColor": "#263238" + }, + { + "label": "White", + "value": 9, + "mainColor": "#222222", + "accentColor": "#dddddd", + "backgroundColor": "#ffffff" + }, + { + "label": "Tron", + "value": 10, + "mainColor": "#effbff", + "accentColor": "#6ee2ff", + "backgroundColor": "#242b33" + }, + { + "label": "Blues", + "value": 11, + "mainColor": "#eff1fc", + "accentColor": "#6677eb", + "backgroundColor": "#2b2c56" + }, + { + "label": "Passion", + "value": 12, + "mainColor": "#12005e", + "accentColor": "#8e24aa", + "backgroundColor": "#f5f5f5" + }, + { + "label": "Chalk", + "value": 13, + "mainColor": "#aabbc3", + "accentColor": "#ff869a", + "backgroundColor": "#263238" + }, + { + "label": "Paper", + "value": 14, + "mainColor": "#4c432e", + "accentColor": "#aa9a73", + "backgroundColor": "#f8f6f1" + } + ] + } + apps.json: | + { + "categories": [ + { + "name": "Monitoring", + "items": [ + { + "name": "Test", + "displayURL": "Test.exaple.com", + "url": "test.exaple.com", + "icon": "e88a", + "newTab": true + } + ] + } + ] + } + search.json: | + { + "placeholder": "", + "defaultProvider": "https://duckduckgo.com/?q=", + "autoFocus": false, + "providers": [ + { + "name": "Allmusic", + "url": "https://www.allmusic.com/search/all/", + "prefix": "/a" + }, + { + "name": "Discogs", + "url": "https://www.discogs.com/search/?q=", + "prefix": "/di" + }, + { + "name": "iMDB", + "url": "https://www.imdb.com/find?q=", + "prefix": "/i" + }, + { + "name": "TheMovieDB", + "url": "https://www.themoviedb.org/search?query=", + "prefix": "/m" + }, + { + "name": "Reddit", + "url": "https://www.reddit.com/search?q=", + "prefix": "/r" + }, + { + "name": "Soundcloud", + "url": "https://soundcloud.com/search?q=", + "prefix": "/so" + }, + { + "name": "Spotify", + "url": "https://open.spotify.com/search/results/", + "prefix": "/s" + }, + { + "name": "TheTVDB", + "url": "https://www.thetvdb.com/search?q=", + "prefix": "/tv" + }, + { + "name": "YouTube", + "url": "https://youtube.com/results?search_query=", + "prefix": "/yt" + } + ] + } +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: dashboard-deployment + namespace: dashboard + labels: + app: dashboard +spec: + replicas: 3 + selector: + matchLabels: + app: dashboard + template: + metadata: + labels: + app: dashboard + spec: + volumes: + - name: dashboard-data + configMap: + name: dashboard-data + defaultMode: 0666 + containers: + - name: dashboard + image: phntxx/dashboard:latest + imagePullPolicy: IfNotPresent + restartPolicy: unless-stopped + ports: + - containerPort: 8080 + volumeMounts: + - mountPath: "/app/data" + name: dashboard-data +--- +apiVersion: v1 +kind: Service +metadata: + name: dashboard + namespace: dashboard +spec: + selector: + app: dashboard + ports: + - protocol: TCP + port: 80 + targetPort: 8080 \ No newline at end of file -- 2.45.2 From 4e39627bbf9a49d17be01433685b26bf6b397035 Mon Sep 17 00:00:00 2001 From: Sebastian Leheis Date: Wed, 20 Sep 2023 18:02:01 +0200 Subject: [PATCH 2/2] Added config for service --- core-deployments.yaml | 21 +++++++++++++++++++++ dashboard/dashboard.yaml | 30 ++++++++++++++++++++++++------ 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/core-deployments.yaml b/core-deployments.yaml index 430d48e..dbfe4d6 100644 --- a/core-deployments.yaml +++ b/core-deployments.yaml @@ -156,6 +156,27 @@ spec: destination: server: https://kubernetes.default.svc namespace: quota + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: + selfHeal: false + prune: true +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: dashboard + namespace: argocd +spec: + project: default + source: + repoURL: https://git.ar21.de/yolokube/core-deployments.git + targetRevision: HEAD + path: dashboard + destination: + server: https://kubernetes.default.svc + namespace: dashboard syncPolicy: syncOptions: - CreateNamespace=true diff --git a/dashboard/dashboard.yaml b/dashboard/dashboard.yaml index a9fb723..ffc5153 100644 --- a/dashboard/dashboard.yaml +++ b/dashboard/dashboard.yaml @@ -177,10 +177,10 @@ data: "name": "Monitoring", "items": [ { - "name": "Test", - "displayURL": "Test.exaple.com", - "url": "test.exaple.com", - "icon": "e88a", + "name": "Grafana", + "displayURL": "grafana-old.services.yolokube.de", + "url": "grafana-old.services.yolokube.de", + "icon": "e6e1", "newTab": true } ] @@ -277,7 +277,7 @@ spec: apiVersion: v1 kind: Service metadata: - name: dashboard + name: dashboard-service namespace: dashboard spec: selector: @@ -285,4 +285,22 @@ spec: ports: - protocol: TCP port: 80 - targetPort: 8080 \ No newline at end of file + targetPort: 8080 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: dashboard-ingress + namespace: dashboard +spec: + rules: + - host: "dashboard.apps.yolokube.de" + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: dashboard-service + port: + number: 80 \ No newline at end of file -- 2.45.2