Skip to content

Commit

Permalink
feat: add homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
ishioni committed Dec 2, 2023
1 parent c27985f commit 1ed917f
Show file tree
Hide file tree
Showing 16 changed files with 470 additions and 3 deletions.
158 changes: 158 additions & 0 deletions kubernetes/apps/default/homepage/app/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: homepage-config
namespace: default
labels:
app.kubernetes.io/name: homepage
data:
bookmarks.yaml: |
- Media:
- YouTube:
- href: https://youtube.com/feed/subscriptions
- Rumble:
- href: https://rumble.com
- Odysee:
- href: https://odysee.com/
- Tech:
- HackerNews:
- href: https://news.ycombinator.com
- Anandtech:
- href: https://www.anandtech.com
- Moronix:
- href: https://www.phoronix.com
- ServeTheHome:
- href: https://www.servethehome.com
- Social:
- Kiwi:
- href: https://kiwifarms.net
- Poast:
- href: https://poa.st
- zzzChan:
- href: https://zzzchan.xyz
docker.yaml: ""
kubernetes.yaml: |
mode: cluster
services.yaml: |
- Calendar:
# - Calendar:
# widget:
# type: calendar
# firstDayInWeek: sunday # optional - defaults to monday
# view: monthly # optional - possible values monthly, agenda
# maxEvents: 10 # optional - defaults to 10
# integrations: # optional
# - type: sonarr # active widget type that is currently enabled on homepage - possible values: radarr, sonarr, lidarr, readarr
# service_group: Downloads # group name where widget exists
# service_name: Sonarr # service name for that widget
# - type: radarr # active widget type that is currently enabled on homepage - possible values: radarr, sonarr, lidarr, readarr
# service_group: Downloads # group name where widget exists
# service_name: Radarr # service name for that widget
# - type: readarr # active widget type that is currently enabled on homepage - possible values: radarr, sonarr, lidarr, readarr
# service_group: Downloads # group name where widget exists
# service_name: Readarr # service name for that
- Agenda:
widget:
type: calendar
view: agenda # optional - possible values monthly, agenda
maxEvents: 20 # optional - defaults to 10
integrations: # optional
- type: sonarr # active widget type that is currently enabled on homepage - possible values: radarr, sonarr>
service_group: Downloads # group name where widget exists
service_name: Sonarr # service name for that widget
- type: radarr # active widget type that is currently enabled on homepage - possible values: radarr, sonarr>
service_group: Downloads # group name where widget exists
service_name: Radarr # service name for that widget
- type: readarr # active widget type that is currently enabled on homepage - possible values: radarr, sonar>
service_group: Downloads # group name where widget exists
service_name: Readarr # service name for that widget
- Infrastructure:
- Unifi:
href: https://unifi.services.${SECRET_DOMAIN}
icon: unifi.png
description: Unifi Dashboard
widget:
type: unifi
url: https://unifi.services.${SECRET_DOMAIN}
username: {{HOMEPAGE_VAR_UNIFI_USERNAME}}
password: {{HOMEPAGE_VAR_UNIFI_PASSWORD}}
- TrueNAS:
href: https://truenas.services.${SECRET_DOMAIN}
icon: truenas.png
description: NAS
widget:
type: truenas
url: https://truenas.services.${SECRET_DOMAIN}
key: {{HOMEPAGE_VAR_TRUENAS_TOKEN}}
- Minecraft:
- Minecraft:
icon: minecraft.png
widget:
type: minecraft
url: udp://192.168.3.5:25565
settings.yaml: |
title: Dashboard
favicon: https://github.com/walkxcode/dashboard-icons/blob/main/png/heimdall.png
background: https://images.unsplash.com/photo-1502790671504-542ad42d5189?auto=format&fit=crop&w=2560&q=80
theme: dark
color: slate
headerStyle: clean
layout:
Calendar:
style: column
icon: mdi-calendar
Media:
style: column
icon: mdi-play-circle
Infrastructure:
style: row
columns: 3
icon: mdi-server
Storage:
style: row
columns: 2
icon: mdi-desktop-tower
Home:
style: column
icon: mdi-home-analytics
Minecraft:
style: row
columns: 3
icon: mdi-minecraft
Downloads:
style: row
columns: 3
icon: mdi-download-circle
widgets.yaml: |
- resources:
backend: kubernetes
cpu: true
expanded: true
memory: true
- search:
provider: [brave, bing]
focus: false
target: _blank
- kubernetes:
cluster:
cpu: true
label: cluster
memory: true
show: true
showLabel: true
nodes:
cpu: true
memory: true
show: false
showLabel: true
- openmeteo:
label: Home
units: metric
cache: 5
- datetime:
text_size: l
format:
dateStyle: long
timeStyle: short
hourCycle: h23
89 changes: 89 additions & 0 deletions kubernetes/apps/default/homepage/app/externalsecret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/ishioni/CRDs-catalog/main/external-secrets.io/externalsecret_v1beta1.json
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: &name homepage-secret
namespace: default
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
target:
name: *name
creationPolicy: Owner
template:
engineVersion: v2
data:
## Non Cluster resources
HOMEPAGE_VAR_UNIFI_USERNAME: "{{ .unifi_user }}"
HOMEPAGE_VAR_UNIFI_PASSWORD: "{{ .unifi_pass }}"
HOMEPAGE_VAR_HASS_TOKEN: "{{ .hass_token }}"
HOMEPAGE_VAR_TRUENAS_TOKEN: "{{ .truenas_token }}"
## Downloads
HOMEPAGE_VAR_BAZARR_TOKEN: "{{ .bazarr_token }}"
HOMEPAGE_VAR_PROWLARR_TOKEN: "{{ .prowlarr_token }}"
HOMEPAGE_VAR_RADARR_TOKEN: "{{ .radarr_token }}"
HOMEPAGE_VAR_READARR_TOKEN: "{{ .readarr_token }}"
HOMEPAGE_VAR_SONARR_TOKEN: "{{ .sonarr_token }}"
HOMEPAGE_VAR_LIDARR_TOKEN: "{{ .lidarr_token }}"
HOMEPAGE_VAR_TRANSMISSION_PASSWORD: "{{ .transmission_password }}"
## Security
HOMEPAGE_VAR_AUTHENTIK_TOKEN: "{{ .authentik_token }}"
HOMEPAGE_VAR_IMMICH_TOKEN: "{{ .immich_token }}"
data:
## Non Cluster
- secretKey: unifi_user
remoteRef:
key: unpoller
property: username
- secretKey: unifi_pass
remoteRef:
key: unpoller
property: password
- secretKey: hass_token
remoteRef:
key: homeassistant
property: HASS_TOKEN
- secretKey: truenas_token
remoteRef:
key: democratic-csi
property: API_TOKEN
## Downloads
- secretKey: bazarr_token
remoteRef:
key: bazarr
property: API_KEY
- secretKey: prowlarr_token
remoteRef:
key: prowlarr
property: PROWLARR__API_KEY
- secretKey: radarr_token
remoteRef:
key: radarr
property: RADARR__API_KEY
- secretKey: readarr_token
remoteRef:
key: readarr
property: READARR__API_KEY
- secretKey: sonarr_token
remoteRef:
key: sonarr
property: SONARR__API_KEY
- secretKey: lidarr_token
remoteRef:
key: lidarr
property: LIDARR__API_KEY
- secretKey: transmission_password
remoteRef:
key: transmission
property: RPC_PASSWORD
## Security
- secretKey: authentik_token
remoteRef:
key: authentik
property: TERRAFORM_TOKEN
- secretKey: immich_token
remoteRef:
key: immich
property: API_TOKEN
86 changes: 86 additions & 0 deletions kubernetes/apps/default/homepage/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/ishioni/CRDs-catalog/main/helm.toolkit.fluxcd.io/helmrelease_v2beta1.json
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: homepage
namespace: default
spec:
interval: 15m
chart:
spec:
chart: app-template
version: 2.3.0
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
maxHistory: 3
install:
createNamespace: true
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
uninstall:
keepHistory: false
values:
controllers:
main:
annotations:
secret.reloader.stakater.com/reload: &secret homepage-secret
configmap.reloader.stakater.com/reload: &configmap homepage-config
strategy: RollingUpdate
containers:
main:
image:
repository: ghcr.io/gethomepage/homepage
tag: v0.8.2
env:
TZ: ${CONFIG_TIMEZONE}
envFrom:
- secretRef:
name: homepage-secret
service:
main:
ports:
http:
enabled: true
port: 3000
ingress:
main:
enabled: true
className: private
hosts:
- host: &host home.internal.${SECRET_DOMAIN}
paths:
- path: /
service:
name: main
port: http
tls:
- secretName: *host
hosts:
- *host
persistence:
config:
enabled: true
type: configMap
name: *configmap
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
9 changes: 9 additions & 0 deletions kubernetes/apps/default/homepage/app/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./configmap.yaml
- ./externalsecret.yaml
- ./helmrelease.yaml
- ./rbac.yaml
Loading

0 comments on commit 1ed917f

Please sign in to comment.