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
+230
-94
No files matched your search
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: Set addon facts
|
||||
ansible.builtin.set_fact:
|
||||
addon_name: hajimari
|
||||
addon_name: homepage
|
||||
addon_namespace: default
|
||||
|
||||
- name: Ensure directories exist for {{ addon_namespace }}/{{ addon_name }}
|
||||
@@ -8,9 +8,9 @@
|
||||
when: csi_driver_nfs.enabled | default(false)
|
||||
ansible.builtin.include_tasks: csi_driver_nfs.yaml
|
||||
|
||||
- name: Process addon hajimari
|
||||
when: hajimari.enabled | default(false)
|
||||
ansible.builtin.include_tasks: hajimari.yaml
|
||||
- name: Process addon homepage
|
||||
when: homepage.enabled | default(false)
|
||||
ansible.builtin.include_tasks: homepage.yaml
|
||||
|
||||
- name: Process addon grafana
|
||||
when: grafana.enabled | default(false)
|
||||
|
||||
@@ -159,8 +159,17 @@ spec:
|
||||
ingress:
|
||||
enabled: true
|
||||
ingressClassName: internal
|
||||
{% if homepage.enabled | default(false) %}
|
||||
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:
|
||||
- &host "grafana.${SECRET_DOMAIN}"
|
||||
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
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./configmap.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
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app hajimari
|
||||
name: &app homepage
|
||||
namespace: flux-system
|
||||
spec:
|
||||
targetNamespace: default
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
path: ./kubernetes/apps/default/hajimari/app
|
||||
path: ./kubernetes/apps/default/homepage/app
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
@@ -93,9 +93,14 @@ data:
|
||||
ingress:
|
||||
enabled: true
|
||||
ingressClassName: internal
|
||||
{% if homepage.enabled | default(false) %}
|
||||
annotations:
|
||||
hajimari.io/appName: Prometheus
|
||||
hajimari.io/icon: simple-icons:prometheus
|
||||
gethomepage.dev/enabled: "true"
|
||||
gethomepage.dev/icon: prometheus.png
|
||||
gethomepage.dev/name: Prometheus
|
||||
gethomepage.dev/group: Observability
|
||||
gethomepage.dev/widget.type: prometheus
|
||||
{% endif %}
|
||||
pathType: Prefix
|
||||
hosts:
|
||||
- "prometheus.${SECRET_DOMAIN}"
|
||||
|
||||
@@ -31,8 +31,13 @@ spec:
|
||||
ingress:
|
||||
enabled: true
|
||||
className: internal
|
||||
annotations:
|
||||
hajimari.io/icon: mdi:kubernetes
|
||||
{% if homepage.enabled | default(false) %}
|
||||
annotations:
|
||||
gethomepage.dev/enabled: "true"
|
||||
gethomepage.dev/icon: kubernetes-dashboard.png
|
||||
gethomepage.dev/name: Kubernetes Dashboard
|
||||
gethomepage.dev/group: Observability
|
||||
{% endif %}
|
||||
hosts:
|
||||
- &host "kubernetes.${SECRET_DOMAIN}"
|
||||
tls:
|
||||
|
||||
@@ -31,8 +31,13 @@ spec:
|
||||
ingress:
|
||||
enabled: true
|
||||
className: internal
|
||||
{% if homepage.enabled | default(false) %}
|
||||
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:
|
||||
- host: &host "gitops.${SECRET_DOMAIN}"
|
||||
paths:
|
||||
|
||||
@@ -4,8 +4,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./namespace.yaml
|
||||
{% if hajimari.enabled | default(false) %}
|
||||
- ./hajimari/ks.yaml
|
||||
{% if homepage.enabled | default(false) %}
|
||||
- ./homepage/ks.yaml
|
||||
{% endif %}
|
||||
{% if discord_template_notifier.enabled | default(false) %}
|
||||
- ./discord-template-notifier/ks.yaml
|
||||
|
||||
@@ -5,7 +5,6 @@ metadata:
|
||||
name: flux-webhook
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/target: "external.${SECRET_DOMAIN}"
|
||||
hajimari.io/enable: "false"
|
||||
spec:
|
||||
ingressClassName: external
|
||||
rules:
|
||||
|
||||
@@ -52,8 +52,13 @@ data:
|
||||
ingress:
|
||||
enabled: true
|
||||
className: internal
|
||||
{% if homepage.enabled | default(false) %}
|
||||
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:
|
||||
- "hubble.${SECRET_DOMAIN}"
|
||||
tls:
|
||||
|
||||
@@ -72,7 +72,12 @@ spec:
|
||||
className: external
|
||||
annotations:
|
||||
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:
|
||||
- host: &host "{% raw %}{{ .Release.Name }}{% endraw %}.${SECRET_DOMAIN}"
|
||||
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
|
||||
- ./external-dns.yaml
|
||||
- ./grafana.yaml
|
||||
- ./hajimari.yaml
|
||||
- ./ingress-nginx.yaml
|
||||
- ./jetstack.yaml
|
||||
- ./k8s-gateway.yaml
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# Addons configuration - addons.yaml is gitignored
|
||||
#
|
||||
|
||||
# https://github.com/toboshii/hajimari
|
||||
hajimari:
|
||||
# https://gethomepage.dev
|
||||
homepage:
|
||||
enabled: false
|
||||
|
||||
# https://github.com/grafana/grafana
|
||||
|
||||
Reference in new issue
Block a user