Replace Hajimari with Homepage (#1127)
* feat: replace hajimari with homepage * fix: add secret * fix: homepage configmap kubernetes widget Signed-off-by: Jory Irving <jory@jory.dev> * feat: wrap annotations in blocks * chore: homepage change ingress to internal Signed-off-by: Jory Irving <jory@jory.dev> --------- Signed-off-by: Jory Irving <jory@jory.dev>
This commit is contained in:
1 parent
d093d0a4e1
commit
ee5de426a4
19 files changed
+229
-93
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Set addon facts
|
- name: Set addon facts
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
addon_name: hajimari
|
addon_name: homepage
|
||||||
addon_namespace: default
|
addon_namespace: default
|
||||||
|
|
||||||
- name: Ensure directories exist for {{ addon_namespace }}/{{ addon_name }}
|
- name: Ensure directories exist for {{ addon_namespace }}/{{ addon_name }}
|
||||||
@@ -8,9 +8,9 @@
|
|||||||
when: csi_driver_nfs.enabled | default(false)
|
when: csi_driver_nfs.enabled | default(false)
|
||||||
ansible.builtin.include_tasks: csi_driver_nfs.yaml
|
ansible.builtin.include_tasks: csi_driver_nfs.yaml
|
||||||
|
|
||||||
- name: Process addon hajimari
|
- name: Process addon homepage
|
||||||
when: hajimari.enabled | default(false)
|
when: homepage.enabled | default(false)
|
||||||
ansible.builtin.include_tasks: hajimari.yaml
|
ansible.builtin.include_tasks: homepage.yaml
|
||||||
|
|
||||||
- name: Process addon grafana
|
- name: Process addon grafana
|
||||||
when: grafana.enabled | default(false)
|
when: grafana.enabled | default(false)
|
||||||
|
|||||||
@@ -159,8 +159,17 @@ spec:
|
|||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
ingressClassName: internal
|
ingressClassName: internal
|
||||||
|
{% if homepage.enabled | default(false) %}
|
||||||
annotations:
|
annotations:
|
||||||
hajimari.io/icon: simple-icons:grafana
|
gethomepage.dev/enabled: "true"
|
||||||
|
gethomepage.dev/icon: grafana.png
|
||||||
|
gethomepage.dev/name: Grafana
|
||||||
|
gethomepage.dev/group: Observability
|
||||||
|
gethomepage.dev/widget.type: grafana
|
||||||
|
gethomepage.dev/widget.url: http://grafana.observability
|
||||||
|
gethomepage.dev/widget.username: '{{`{{HOMEPAGE_VAR_GRAFANA_USERNAME}}`}}'
|
||||||
|
gethomepage.dev/widget.password: '{{`{{HOMEPAGE_VAR_GRAFANA_PASSWORD}}`}}'
|
||||||
|
{% endif %}
|
||||||
hosts:
|
hosts:
|
||||||
- &host "grafana.${SECRET_DOMAIN}"
|
- &host "grafana.${SECRET_DOMAIN}"
|
||||||
tls:
|
tls:
|
||||||
|
|||||||
@@ -1,65 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: hajimari
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: hajimari
|
|
||||||
version: 2.0.2
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: hajimari
|
|
||||||
namespace: flux-system
|
|
||||||
maxHistory: 2
|
|
||||||
install:
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
uninstall:
|
|
||||||
keepHistory: false
|
|
||||||
values:
|
|
||||||
hajimari:
|
|
||||||
title: Apps
|
|
||||||
darkTheme: espresso
|
|
||||||
alwaysTargetBlank: true
|
|
||||||
showGreeting: false
|
|
||||||
showAppGroups: false
|
|
||||||
showAppStatus: false
|
|
||||||
showBookmarkGroups: false
|
|
||||||
showGlobalBookmarks: false
|
|
||||||
showAppUrls: false
|
|
||||||
defaultEnable: true
|
|
||||||
namespaceSelector:
|
|
||||||
matchNames:
|
|
||||||
- default
|
|
||||||
- observability
|
|
||||||
ingress:
|
|
||||||
main:
|
|
||||||
enabled: true
|
|
||||||
ingressClassName: internal
|
|
||||||
annotations:
|
|
||||||
hajimari.io/enable: "false"
|
|
||||||
hosts:
|
|
||||||
- host: &host "hajimari.${SECRET_DOMAIN}"
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- *host
|
|
||||||
podAnnotations:
|
|
||||||
configmap.reloader.stakater.com/reload: hajimari-settings
|
|
||||||
persistence:
|
|
||||||
data:
|
|
||||||
enabled: true
|
|
||||||
type: emptyDir
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 128M
|
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: homepage-config
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: homepage
|
||||||
|
data:
|
||||||
|
bookmarks.yaml: |
|
||||||
|
- Communitcate:
|
||||||
|
- Discord:
|
||||||
|
- icon: discord.png # https://github.com/walkxcode/dashboard-icons
|
||||||
|
href: 'https://discord.com/app'
|
||||||
|
- Media:
|
||||||
|
- YouTube:
|
||||||
|
- icon: youtube.png
|
||||||
|
href: 'https://youtube.com/feed/subscriptions'
|
||||||
|
- Reading:
|
||||||
|
- Reddit:
|
||||||
|
- icon: reddit.png
|
||||||
|
href: 'https://reddit.com'
|
||||||
|
- Git:
|
||||||
|
- kubesearch:
|
||||||
|
- icon: kubernetes-dashboard.png
|
||||||
|
href: 'https://kubesearch.dev/'
|
||||||
|
- flux-cluster-template:
|
||||||
|
- icon: github.png
|
||||||
|
href: 'https://github.com/onedr0p/flux-cluster-template'
|
||||||
|
docker.yaml: ""
|
||||||
|
kubernetes.yaml: |
|
||||||
|
mode: cluster
|
||||||
|
services.yaml: |
|
||||||
|
- Network:
|
||||||
|
- Cloudflared:
|
||||||
|
href: https://dash.cloudflare.com/
|
||||||
|
icon: cloudflare-zero-trust.png
|
||||||
|
description: Cloudflared Tunnel
|
||||||
|
widget:
|
||||||
|
type: cloudflared
|
||||||
|
accountid: {{HOMEPAGE_VAR_CLOUDFLARED_ACCOUNTID}}
|
||||||
|
tunnelid: {{HOMEPAGE_VAR_CLOUDFLARED_TUNNELID}}
|
||||||
|
key: {{HOMEPAGE_VAR_CLOUDFLARED_API_TOKEN}}
|
||||||
|
settings.yaml: |
|
||||||
|
title: Dashboard
|
||||||
|
theme: dark
|
||||||
|
color: slate
|
||||||
|
headerStyle: clean
|
||||||
|
layout:
|
||||||
|
Home:
|
||||||
|
style: column
|
||||||
|
icon: mdi-home-analytics
|
||||||
|
Network:
|
||||||
|
style: row
|
||||||
|
columns: 3
|
||||||
|
icon: mdi-server
|
||||||
|
Observability:
|
||||||
|
style: column
|
||||||
|
icon: mdi-chart-line
|
||||||
|
widgets.yaml: |
|
||||||
|
- resources:
|
||||||
|
backend: kubernetes
|
||||||
|
cpu: true
|
||||||
|
expanded: true
|
||||||
|
memory: true
|
||||||
|
- search:
|
||||||
|
provider: [duckduckgo]
|
||||||
|
focus: false
|
||||||
|
target: _blank
|
||||||
|
- greeting:
|
||||||
|
text_size: xl
|
||||||
|
text: "Welcome!"
|
||||||
|
- datetime:
|
||||||
|
text_size: l
|
||||||
|
format:
|
||||||
|
dateStyle: long
|
||||||
|
timeStyle: short
|
||||||
|
hourCycle: h23
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: homepage
|
||||||
|
spec:
|
||||||
|
interval: 30m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: app-template
|
||||||
|
version: 2.4.0
|
||||||
|
interval: 30m
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: bjw-s
|
||||||
|
namespace: flux-system
|
||||||
|
maxHistory: 2
|
||||||
|
install:
|
||||||
|
createNamespace: true
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
cleanupOnFail: true
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
uninstall:
|
||||||
|
keepHistory: false
|
||||||
|
values:
|
||||||
|
controllers:
|
||||||
|
main:
|
||||||
|
annotations:
|
||||||
|
reloader.stakater.com/auto: "true"
|
||||||
|
containers:
|
||||||
|
main:
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/gethomepage/homepage
|
||||||
|
tag: v0.8.4
|
||||||
|
env:
|
||||||
|
TZ: "${TIMEZONE}"
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: homepage-secret
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 15m
|
||||||
|
memory: 100M
|
||||||
|
limits:
|
||||||
|
memory: 250M
|
||||||
|
service:
|
||||||
|
main:
|
||||||
|
ports:
|
||||||
|
http:
|
||||||
|
port: 3000
|
||||||
|
ingress:
|
||||||
|
main:
|
||||||
|
enabled: true
|
||||||
|
className: internal
|
||||||
|
hosts:
|
||||||
|
- host: &host home.${SECRET_DOMAIN}
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
service:
|
||||||
|
name: main
|
||||||
|
port: http
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- *host
|
||||||
|
persistence:
|
||||||
|
config:
|
||||||
|
enabled: true
|
||||||
|
type: configMap
|
||||||
|
name: homepage-config
|
||||||
|
globalMounts:
|
||||||
|
- subPath: bookmarks.yaml
|
||||||
|
path: /app/config/bookmarks.yaml
|
||||||
|
- subPath: docker.yaml
|
||||||
|
path: /app/config/docker.yaml
|
||||||
|
- subPath: kubernetes.yaml
|
||||||
|
path: /app/config/kubernetes.yaml
|
||||||
|
- subPath: services.yaml
|
||||||
|
path: /app/config/services.yaml
|
||||||
|
- subPath: settings.yaml
|
||||||
|
path: /app/config/settings.yaml
|
||||||
|
- subPath: widgets.yaml
|
||||||
|
path: /app/config/widgets.yaml
|
||||||
|
serviceAccount:
|
||||||
|
create: true
|
||||||
+2
@@ -2,4 +2,6 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
|
- ./configmap.yaml
|
||||||
- ./helmrelease.yaml
|
- ./helmrelease.yaml
|
||||||
|
- ./secret.sops.yaml
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: homepage-secret
|
||||||
|
stringData:
|
||||||
|
HOMEPAGE_VAR_CLOUDFLARED_ACCOUNTID: "{{ bootstrap_cloudflare_account_tag }}"
|
||||||
|
HOMEPAGE_VAR_CLOUDFLARED_TUNNELID: "{{ bootstrap_cloudflare_tunnel_id }}"
|
||||||
|
HOMEPAGE_VAR_CLOUDFLARED_API_TOKEN: "{{ bootstrap_cloudflare_token }}"
|
||||||
|
HOMEPAGE_VAR_GRAFANA_USERNAME: admin
|
||||||
|
HOMEPAGE_VAR_GRAFANA_PASSWORD: "{{ grafana.password }}"
|
||||||
+2
-2
@@ -2,14 +2,14 @@
|
|||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: &app hajimari
|
name: &app homepage
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
targetNamespace: default
|
targetNamespace: default
|
||||||
commonMetadata:
|
commonMetadata:
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: *app
|
app.kubernetes.io/name: *app
|
||||||
path: ./kubernetes/apps/default/hajimari/app
|
path: ./kubernetes/apps/default/homepage/app
|
||||||
prune: true
|
prune: true
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
@@ -93,9 +93,14 @@ data:
|
|||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
ingressClassName: internal
|
ingressClassName: internal
|
||||||
|
{% if homepage.enabled | default(false) %}
|
||||||
annotations:
|
annotations:
|
||||||
hajimari.io/appName: Prometheus
|
gethomepage.dev/enabled: "true"
|
||||||
hajimari.io/icon: simple-icons:prometheus
|
gethomepage.dev/icon: prometheus.png
|
||||||
|
gethomepage.dev/name: Prometheus
|
||||||
|
gethomepage.dev/group: Observability
|
||||||
|
gethomepage.dev/widget.type: prometheus
|
||||||
|
{% endif %}
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
hosts:
|
hosts:
|
||||||
- "prometheus.${SECRET_DOMAIN}"
|
- "prometheus.${SECRET_DOMAIN}"
|
||||||
|
|||||||
@@ -31,8 +31,13 @@ spec:
|
|||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
className: internal
|
className: internal
|
||||||
|
{% if homepage.enabled | default(false) %}
|
||||||
annotations:
|
annotations:
|
||||||
hajimari.io/icon: mdi:kubernetes
|
gethomepage.dev/enabled: "true"
|
||||||
|
gethomepage.dev/icon: kubernetes-dashboard.png
|
||||||
|
gethomepage.dev/name: Kubernetes Dashboard
|
||||||
|
gethomepage.dev/group: Observability
|
||||||
|
{% endif %}
|
||||||
hosts:
|
hosts:
|
||||||
- &host "kubernetes.${SECRET_DOMAIN}"
|
- &host "kubernetes.${SECRET_DOMAIN}"
|
||||||
tls:
|
tls:
|
||||||
|
|||||||
@@ -31,8 +31,13 @@ spec:
|
|||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
className: internal
|
className: internal
|
||||||
|
{% if homepage.enabled | default(false) %}
|
||||||
annotations:
|
annotations:
|
||||||
hajimari.io/icon: sawtooth-wave
|
gethomepage.dev/enabled: "true"
|
||||||
|
gethomepage.dev/group: Home
|
||||||
|
gethomepage.dev/name: Weave-gitops
|
||||||
|
gethomepage.dev/icon: flux-cd.png
|
||||||
|
{% endif %}
|
||||||
hosts:
|
hosts:
|
||||||
- host: &host "gitops.${SECRET_DOMAIN}"
|
- host: &host "gitops.${SECRET_DOMAIN}"
|
||||||
paths:
|
paths:
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- ./namespace.yaml
|
- ./namespace.yaml
|
||||||
{% if hajimari.enabled | default(false) %}
|
{% if homepage.enabled | default(false) %}
|
||||||
- ./hajimari/ks.yaml
|
- ./homepage/ks.yaml
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if discord_template_notifier.enabled | default(false) %}
|
{% if discord_template_notifier.enabled | default(false) %}
|
||||||
- ./discord-template-notifier/ks.yaml
|
- ./discord-template-notifier/ks.yaml
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ metadata:
|
|||||||
name: flux-webhook
|
name: flux-webhook
|
||||||
annotations:
|
annotations:
|
||||||
external-dns.alpha.kubernetes.io/target: "external.${SECRET_DOMAIN}"
|
external-dns.alpha.kubernetes.io/target: "external.${SECRET_DOMAIN}"
|
||||||
hajimari.io/enable: "false"
|
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: external
|
ingressClassName: external
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
@@ -52,8 +52,13 @@ data:
|
|||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
className: internal
|
className: internal
|
||||||
|
{% if homepage.enabled | default(false) %}
|
||||||
annotations:
|
annotations:
|
||||||
hajimari.io/icon: simple-icons:cilium
|
gethomepage.dev/enabled: "true"
|
||||||
|
gethomepage.dev/group: Network
|
||||||
|
gethomepage.dev/name: Cilium
|
||||||
|
gethomepage.dev/icon: cilium.png
|
||||||
|
{% endif %}
|
||||||
hosts:
|
hosts:
|
||||||
- "hubble.${SECRET_DOMAIN}"
|
- "hubble.${SECRET_DOMAIN}"
|
||||||
tls:
|
tls:
|
||||||
|
|||||||
@@ -72,7 +72,12 @@ spec:
|
|||||||
className: external
|
className: external
|
||||||
annotations:
|
annotations:
|
||||||
external-dns.alpha.kubernetes.io/target: "external.${SECRET_DOMAIN}"
|
external-dns.alpha.kubernetes.io/target: "external.${SECRET_DOMAIN}"
|
||||||
hajimari.io/icon: video-input-antenna
|
{% if homepage.enabled | default(false) %}
|
||||||
|
gethomepage.dev/enabled: "true"
|
||||||
|
gethomepage.dev/group: Network
|
||||||
|
gethomepage.dev/name: Echo Server
|
||||||
|
gethomepage.dev/icon: mdi-video-input-antenna
|
||||||
|
{% endif %}
|
||||||
hosts:
|
hosts:
|
||||||
- host: &host "{% raw %}{{ .Release.Name }}{% endraw %}.${SECRET_DOMAIN}"
|
- host: &host "{% raw %}{{ .Release.Name }}{% endraw %}.${SECRET_DOMAIN}"
|
||||||
paths:
|
paths:
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: source.toolkit.fluxcd.io/v1beta2
|
|
||||||
kind: HelmRepository
|
|
||||||
metadata:
|
|
||||||
name: hajimari
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
interval: 1h
|
|
||||||
url: https://hajimari.io
|
|
||||||
@@ -11,7 +11,6 @@ resources:
|
|||||||
- ./descheduler.yaml
|
- ./descheduler.yaml
|
||||||
- ./external-dns.yaml
|
- ./external-dns.yaml
|
||||||
- ./grafana.yaml
|
- ./grafana.yaml
|
||||||
- ./hajimari.yaml
|
|
||||||
- ./ingress-nginx.yaml
|
- ./ingress-nginx.yaml
|
||||||
- ./jetstack.yaml
|
- ./jetstack.yaml
|
||||||
- ./k8s-gateway.yaml
|
- ./k8s-gateway.yaml
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
# Addons configuration - addons.yaml is gitignored
|
# Addons configuration - addons.yaml is gitignored
|
||||||
#
|
#
|
||||||
|
|
||||||
# https://github.com/toboshii/hajimari
|
# https://gethomepage.dev
|
||||||
hajimari:
|
homepage:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
# https://github.com/grafana/grafana
|
# https://github.com/grafana/grafana
|
||||||
|
|||||||
Reference in new issue
Block a user