[ci skip] Move Terraform modules into stack directories
Move all 88 service modules (66 individual + 22 platform) from modules/kubernetes/<service>/ into their corresponding stack directories: - Service stacks: stacks/<service>/module/ - Platform stack: stacks/platform/modules/<service>/ This collocates module source code with its Terragrunt definition. Only shared utility modules remain in modules/kubernetes/: ingress_factory, setup_tls_secret, dockerhub_secret, oauth-proxy. All cross-references to shared modules updated to use correct relative paths. Verified with terragrunt run --all -- plan: 0 adds, 0 destroys across all 68 stacks.
This commit is contained in:
parent
73cb696f12
commit
e225e81ebf
614 changed files with 12075 additions and 352 deletions
440
stacks/dashy/module/conf.yml
Normal file
440
stacks/dashy/module/conf.yml
Normal file
|
|
@ -0,0 +1,440 @@
|
|||
pageInfo:
|
||||
title: Dashy
|
||||
description: Welcome to your new dashboard!
|
||||
navLinks:
|
||||
- title: GitHub
|
||||
path: https://github.com/Lissy93/dashy
|
||||
- title: Documentation
|
||||
path: https://dashy.to/docs
|
||||
appConfig:
|
||||
theme: material
|
||||
layout: auto
|
||||
iconSize: large
|
||||
sections:
|
||||
- name: Infra
|
||||
icon: si-databricks
|
||||
displayData:
|
||||
sortBy: alphabetical
|
||||
rows: 2
|
||||
cols: 2
|
||||
collapsed: false
|
||||
hideForGuests: false
|
||||
items:
|
||||
- &ref_0
|
||||
title: ESXi R730 (Server)
|
||||
description: R730 esxi UI
|
||||
icon: si-vmware
|
||||
url: https://esxi.viktorbarzin.me/ui/#/login
|
||||
target: newtab
|
||||
id: 0_496_esxirserver
|
||||
- &ref_1
|
||||
title: PFsense (Firewall)
|
||||
description: Firewall
|
||||
icon: si-pfsense
|
||||
url: https://pfsense.viktorbarzin.me
|
||||
target: newtab
|
||||
id: 1_496_pfsensefirewall
|
||||
- &ref_2
|
||||
title: iDRAC
|
||||
description: ""
|
||||
icon: si-dell
|
||||
url: https://idrac.viktorbarzin.me/
|
||||
target: newtab
|
||||
id: 2_496_idrac
|
||||
- &ref_3
|
||||
title: TP-Link Gateway Router
|
||||
icon: hl-asus-router
|
||||
url: https://gw.viktorbarzin.me/webpages/login.html
|
||||
id: 3_496_tplinkgatewayrouter
|
||||
- &ref_4
|
||||
title: Home Assistant London
|
||||
description: Home Assistant London Deployment
|
||||
icon: si-homeassistant
|
||||
url: http://ha-london.viktorbarzin.me/
|
||||
target: newtab
|
||||
id: 4_496_homeassistantlondon
|
||||
- &ref_5
|
||||
title: NAS
|
||||
description: ""
|
||||
icon: si-synology
|
||||
url: https://nas.viktorbarzin.me/
|
||||
id: 5_496_nas
|
||||
- &ref_6
|
||||
title: Server Switch
|
||||
description: TP-Link Extension Switch
|
||||
icon: 🔀
|
||||
url: http://192.168.1.6/
|
||||
target: newtab
|
||||
id: 6_496_serverswitch
|
||||
- &ref_7
|
||||
title: Home Assistant Sofia
|
||||
description: Home Assistant Sofia Deployment
|
||||
icon: si-homeassistant
|
||||
url: http://ha-sofia.viktorbarzin.me/
|
||||
target: newtab
|
||||
id: 7_496_homeassistantsofia
|
||||
- &ref_8
|
||||
title: IP Cameras
|
||||
description: Frigate
|
||||
icon: si-protodotio
|
||||
url: https://frigate.viktorbarzin.me
|
||||
target: newtab
|
||||
id: 8_496_ipcameras
|
||||
filteredItems:
|
||||
- *ref_0
|
||||
- *ref_1
|
||||
- *ref_2
|
||||
- *ref_3
|
||||
- *ref_4
|
||||
- *ref_5
|
||||
- *ref_6
|
||||
- *ref_7
|
||||
- *ref_8
|
||||
- name: Valchedrym Infra
|
||||
displayData:
|
||||
sortBy: default
|
||||
rows: 2
|
||||
cols: 2
|
||||
collapsed: false
|
||||
hideForGuests: false
|
||||
items:
|
||||
- &ref_9
|
||||
title: Valchedrym OpenWRT
|
||||
icon: si-openwrt
|
||||
url: https://valchedrym.viktorbarzin.me/
|
||||
target: newtab
|
||||
id: 0_1567_valchedrymopenwrt
|
||||
- &ref_10
|
||||
title: Valchedram Video System
|
||||
icon: 📷
|
||||
url: http://valchedrym-video.viktorbarzin.me:5080/
|
||||
target: newtab
|
||||
id: 1_1567_valchedramvideosystem
|
||||
- &ref_11
|
||||
title: Mladost 3 Router
|
||||
icon: si-ghostery
|
||||
url: https://mladost3.viktorbarzin.me/
|
||||
target: newtab
|
||||
id: 2_1567_mladostrouter
|
||||
- &ref_12
|
||||
title: Valchedrym Services Uptime
|
||||
description: Uptime Dashboard for Valchedrym Services
|
||||
icon: si-openwrt
|
||||
url: https://uptime.viktorbarzin.me/status/valchedrym
|
||||
target: newtab
|
||||
id: 3_1567_valchedrymservicesuptime
|
||||
icon: 🐶
|
||||
filteredItems:
|
||||
- *ref_9
|
||||
- *ref_10
|
||||
- *ref_11
|
||||
- *ref_12
|
||||
- name: Monitoring
|
||||
icon: hl-grafana
|
||||
displayData:
|
||||
sortBy: alphabetical
|
||||
rows: 3
|
||||
collapsed: false
|
||||
hideForGuests: false
|
||||
cols: 2
|
||||
items:
|
||||
- &ref_13
|
||||
title: Uptime Kuma
|
||||
description: Internal Uptime Monitoring
|
||||
icon: si-uptimekuma
|
||||
url: https://uptime.viktorbarzin.me/status/cluster-internal
|
||||
target: newtab
|
||||
id: 0_1062_uptimekuma
|
||||
- &ref_14
|
||||
title: iDRAC Grafana
|
||||
icon: si-dell
|
||||
url: https://grafana.viktorbarzin.me/d/O19gr0jZk/idrac-host-stats
|
||||
target: newtab
|
||||
statusCheckAcceptCodes: "400"
|
||||
id: 1_1062_idracgrafana
|
||||
- &ref_15
|
||||
title: Kubernetes Cluster Nodes
|
||||
description: Kubernetes Nodes Stats
|
||||
icon: hl-kubernetes
|
||||
url: https://grafana.viktorbarzin.me/d/xfpJB9FGz/node-exporter?orgId=1
|
||||
target: newtab
|
||||
statusCheckAcceptCodes: "400"
|
||||
id: 2_1062_kubernetesclusternodes
|
||||
- &ref_16
|
||||
title: OpenWRT (London)
|
||||
icon: si-openwrt
|
||||
url: https://grafana.viktorbarzin.me/d/fLi0yXAWk/openwrt?orgId=1
|
||||
target: newtab
|
||||
statusCheckAcceptCodes: "400"
|
||||
id: 3_1062_openwrtlondon
|
||||
- &ref_17
|
||||
title: Prometheus
|
||||
icon: si-prometheus
|
||||
url: https://prometheus.viktorbarzin.me/
|
||||
statusCheck: false
|
||||
statusCheckAcceptCodes: "400"
|
||||
id: 4_1062_prometheus
|
||||
- &ref_18
|
||||
title: Alert Manager
|
||||
icon: si-protractor
|
||||
url: https://alertmanager.viktorbarzin.me/
|
||||
target: newtab
|
||||
id: 5_1062_alertmanager
|
||||
- &ref_19
|
||||
title: External Monitoring
|
||||
description: Hetrix report
|
||||
icon: si-amp
|
||||
url: https://wl.hetrixtools.com/r/38981b548b5d38b052aca8d01285a3f3/
|
||||
target: modal
|
||||
id: 6_1062_externalmonitoring
|
||||
- &ref_20
|
||||
title: K8S Dashboard
|
||||
description: Kubernetes dashboard with view of all nodes, pods etc
|
||||
icon: si-kubernetes
|
||||
url: https://k8s.viktorbarzin.me/#/node
|
||||
id: 7_1062_ksdashboard
|
||||
filteredItems:
|
||||
- *ref_13
|
||||
- *ref_14
|
||||
- *ref_15
|
||||
- *ref_16
|
||||
- *ref_17
|
||||
- *ref_18
|
||||
- *ref_19
|
||||
- *ref_20
|
||||
- name: Infra Services
|
||||
displayData:
|
||||
sortBy: default
|
||||
rows: 3
|
||||
cols: 2
|
||||
collapsed: false
|
||||
hideForGuests: false
|
||||
items:
|
||||
- &ref_21
|
||||
title: PhpMyAdmin
|
||||
description: Admin UI for the DB Cluster
|
||||
icon: si-phpmyadmin
|
||||
url: https://pma.viktorbarzin.me/index.php
|
||||
displayData: ttt
|
||||
target: newtab
|
||||
statusCheck: false
|
||||
id: 0_1364_phpmyadmin
|
||||
- &ref_22
|
||||
title: Drone CI
|
||||
description: CI/CD Service
|
||||
icon: si-drone
|
||||
url: https://drone.viktorbarzin.me/
|
||||
target: newtab
|
||||
id: 1_1364_droneci
|
||||
- &ref_23
|
||||
title: DNS Server
|
||||
description: Technitium
|
||||
icon: hl-azure-dns
|
||||
url: https://technitium.viktorbarzin.me/
|
||||
target: newtab
|
||||
statusCheck: false
|
||||
statusCheckAcceptCodes: "400"
|
||||
id: 2_1364_dnsserver
|
||||
- &ref_24
|
||||
title: Headscale (VPN) UI
|
||||
icon: si-wireguard
|
||||
url: https://headscale.viktorbarzin.me/manager
|
||||
target: newtab
|
||||
statusCheck: false
|
||||
statusCheckAcceptCodes: "400"
|
||||
id: 3_1364_headscalevpnui
|
||||
- &ref_25
|
||||
title: URL Shorterner
|
||||
description: Shlink
|
||||
icon: si-curl
|
||||
url: https://shlink.viktorbarzin.me
|
||||
statusCheck: false
|
||||
statusCheckAcceptCodes: "400"
|
||||
id: 4_1364_urlshorterner
|
||||
- &ref_26
|
||||
title: Crowdsec Dashboard
|
||||
icon: si-crowdsource
|
||||
url: >-
|
||||
https://crowdsec.viktorbarzin.me/public/dashboard/8f6226be-d4dc-45f1-bacf-a4584f71dcb0
|
||||
target: newtab
|
||||
id: 5_1364_crowdsecdashboard
|
||||
- &ref_27
|
||||
title: Redis
|
||||
description: Redis
|
||||
icon: si-redis
|
||||
url: https://redis.viktorbarzin.me/
|
||||
target: newtab
|
||||
id: 6_1364_redis
|
||||
- &ref_28
|
||||
title: Truenas
|
||||
description: Network Storage VM
|
||||
icon: si-truenas
|
||||
url: http://truenas.viktorbarzin.me/ui/dashboard
|
||||
id: 7_1364_truenas
|
||||
icon: si-adminer
|
||||
filteredItems:
|
||||
- *ref_21
|
||||
- *ref_22
|
||||
- *ref_23
|
||||
- *ref_24
|
||||
- *ref_25
|
||||
- *ref_26
|
||||
- *ref_27
|
||||
- *ref_28
|
||||
- name: Public Services
|
||||
displayData:
|
||||
sortBy: alphabetical
|
||||
rows: 2
|
||||
cols: 4
|
||||
collapsed: false
|
||||
hideForGuests: false
|
||||
items:
|
||||
- &ref_29
|
||||
title: City Guesser
|
||||
description: Geolocator Game
|
||||
icon: hl-openmaptiles
|
||||
url: https://city-guesser.viktorbarzin.me/
|
||||
target: newtab
|
||||
statusCheck: false
|
||||
id: 0_1475_cityguesser
|
||||
- &ref_30
|
||||
title: Excalidraw
|
||||
description: Collaborative Hand Drawing Tool
|
||||
icon: hl-excalidraw-light
|
||||
url: https://excalidraw.viktorbarzin.me
|
||||
target: newtab
|
||||
statusCheck: false
|
||||
id: 1_1475_excalidraw
|
||||
- &ref_31
|
||||
title: Formula 1 Stream
|
||||
icon: si-f1
|
||||
url: http://f1.viktorbarzin.me/
|
||||
statusCheck: false
|
||||
id: 2_1475_formulastream
|
||||
- &ref_32
|
||||
title: HackMD
|
||||
description: Collaborative Markdown Document Editing
|
||||
icon: si-hackclub
|
||||
url: https://hackmd.viktorbarzin.me/
|
||||
statusCheck: false
|
||||
id: 3_1475_hackmd
|
||||
- &ref_33
|
||||
title: Activate Windows (KMS)
|
||||
description: How to activate Windows Machines
|
||||
icon: si-windows95
|
||||
url: https://kms.viktorbarzin.me/
|
||||
statusCheck: false
|
||||
id: 4_1475_activatewindowskms
|
||||
- &ref_34
|
||||
title: PrivateBin
|
||||
description: E2E Encrypted Pastebin
|
||||
icon: si-pastebin
|
||||
url: https://pb.viktorbarzin.me/
|
||||
statusCheck: false
|
||||
id: 5_1475_privatebin
|
||||
- &ref_35
|
||||
title: Blog
|
||||
description: Personal Blog
|
||||
icon: si-rss
|
||||
url: https://viktorbarzin.me/
|
||||
statusCheck: false
|
||||
id: 6_1475_blog
|
||||
- &ref_36
|
||||
title: Setup VPN (Tailscale)
|
||||
description: "URL to set in app config: https://headscale.viktorbarzin.me"
|
||||
icon: si-wireguard
|
||||
url: https://github.com/juanfont/headscale/blob/main/docs/iOS-client.md
|
||||
target: newtab
|
||||
id: 7_1475_setupvpntailscale
|
||||
- &ref_37
|
||||
title: Vaultwarden
|
||||
description: Self-hosted Bitwarden server (Password Manager)
|
||||
icon: si-bitwarden
|
||||
url: https://vaultwarden.viktorbarzin.me
|
||||
target: newtab
|
||||
id: 8_1475_vaultwarden
|
||||
- &ref_38
|
||||
title: Send
|
||||
description: Share files
|
||||
icon: si-libreoffice
|
||||
url: https://send.viktorbarzin.me/
|
||||
target: newtab
|
||||
id: 9_1475_send
|
||||
- &ref_39
|
||||
title: Youtube Downloader
|
||||
icon: si-youtube
|
||||
url: https://yt.viktorbarzin.me
|
||||
target: newtab
|
||||
id: 10_1475_youtubedownloader
|
||||
- &ref_40
|
||||
title: Photos
|
||||
description: Immich
|
||||
icon: si-immich
|
||||
url: https://photos.viktorbarzin.me
|
||||
target: newtab
|
||||
id: 11_1475_photos
|
||||
- &ref_41
|
||||
title: Audiobookshelf
|
||||
description: >-
|
||||
Audiobook shelf. For iOS, install app from
|
||||
https://url.viktorbarzin.me/audiobookshelf
|
||||
icon: si-audible
|
||||
url: https://audiobookshelf.viktorbarzin.me/
|
||||
target: newtab
|
||||
id: 12_1475_audiobookshelf
|
||||
- &ref_42
|
||||
title: Ollama
|
||||
description: Self-hosted ChatGPT (using llama3)
|
||||
icon: si-openai
|
||||
url: https://ollama.viktorbarzin.me/
|
||||
target: newtab
|
||||
id: 13_1475_ollama
|
||||
- &ref_43
|
||||
title: Paperless-ngx
|
||||
description: Document index
|
||||
icon: hl-paperless-ngx
|
||||
url: https://pdf.viktorbarzin.me/
|
||||
target: newtab
|
||||
id: 14_1475_paperlessngx
|
||||
icon: si-sublimetext
|
||||
filteredItems:
|
||||
- *ref_29
|
||||
- *ref_30
|
||||
- *ref_31
|
||||
- *ref_32
|
||||
- *ref_33
|
||||
- *ref_34
|
||||
- *ref_35
|
||||
- *ref_36
|
||||
- *ref_37
|
||||
- *ref_38
|
||||
- *ref_39
|
||||
- *ref_40
|
||||
- *ref_41
|
||||
- *ref_42
|
||||
- *ref_43
|
||||
- name: Under Construction
|
||||
displayData:
|
||||
sortBy: alphabetical
|
||||
rows: 1
|
||||
cols: 1
|
||||
collapsed: false
|
||||
hideForGuests: false
|
||||
items:
|
||||
- &ref_44
|
||||
title: Travel Blog
|
||||
icon: si-hugo
|
||||
url: https://travel.viktorbarzin.me/
|
||||
target: newtab
|
||||
statusCheck: false
|
||||
id: 0_1833_travelblog
|
||||
- &ref_45
|
||||
title: Personal Finance App
|
||||
icon: si-abstract
|
||||
url: https://finance.viktorbarzin.me/transaction
|
||||
statusCheck: false
|
||||
id: 1_1833_personalfinanceapp
|
||||
icon: si-progress
|
||||
filteredItems:
|
||||
- *ref_44
|
||||
- *ref_45
|
||||
126
stacks/dashy/module/main.tf
Normal file
126
stacks/dashy/module/main.tf
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
|
||||
variable "tls_secret_name" {}
|
||||
variable "tier" { type = string }
|
||||
|
||||
module "tls_secret" {
|
||||
source = "../../../modules/kubernetes/setup_tls_secret"
|
||||
namespace = kubernetes_namespace.dashy.metadata[0].name
|
||||
tls_secret_name = var.tls_secret_name
|
||||
}
|
||||
|
||||
resource "kubernetes_namespace" "dashy" {
|
||||
metadata {
|
||||
name = "dashy"
|
||||
labels = {
|
||||
"istio-injection" : "disabled"
|
||||
tier = var.tier
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubernetes_config_map" "config" {
|
||||
metadata {
|
||||
name = "config"
|
||||
namespace = kubernetes_namespace.dashy.metadata[0].name
|
||||
|
||||
annotations = {
|
||||
"reloader.stakater.com/match" = "true"
|
||||
}
|
||||
}
|
||||
|
||||
data = {
|
||||
"conf.yml" = file("${path.module}/conf.yml")
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubernetes_deployment" "dashy" {
|
||||
metadata {
|
||||
name = "dashy"
|
||||
namespace = kubernetes_namespace.dashy.metadata[0].name
|
||||
labels = {
|
||||
app = "dashy"
|
||||
tier = var.tier
|
||||
}
|
||||
annotations = {
|
||||
"reloader.stakater.com/search" = "true"
|
||||
}
|
||||
}
|
||||
spec {
|
||||
replicas = 1
|
||||
selector {
|
||||
match_labels = {
|
||||
app = "dashy"
|
||||
}
|
||||
}
|
||||
template {
|
||||
metadata {
|
||||
annotations = {
|
||||
# "diun.enable" = "true"
|
||||
}
|
||||
labels = {
|
||||
app = "dashy"
|
||||
}
|
||||
}
|
||||
spec {
|
||||
container {
|
||||
image = "lissy93/dashy:latest"
|
||||
name = "dashy"
|
||||
|
||||
resources {
|
||||
requests = {
|
||||
cpu = "50m"
|
||||
memory = "256Mi"
|
||||
}
|
||||
limits = {
|
||||
cpu = "1"
|
||||
memory = "2Gi"
|
||||
}
|
||||
}
|
||||
port {
|
||||
container_port = 8080
|
||||
}
|
||||
volume_mount {
|
||||
name = "config"
|
||||
mount_path = "/app/user-data/"
|
||||
}
|
||||
}
|
||||
volume {
|
||||
name = "config"
|
||||
config_map {
|
||||
name = "config"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubernetes_service" "dashy" {
|
||||
metadata {
|
||||
name = "dashy"
|
||||
namespace = kubernetes_namespace.dashy.metadata[0].name
|
||||
labels = {
|
||||
app = "dashy"
|
||||
}
|
||||
}
|
||||
|
||||
spec {
|
||||
selector = {
|
||||
app = "dashy"
|
||||
}
|
||||
port {
|
||||
name = "http"
|
||||
port = 80
|
||||
target_port = 8080
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module "ingress" {
|
||||
source = "../../../modules/kubernetes/ingress_factory"
|
||||
namespace = kubernetes_namespace.dashy.metadata[0].name
|
||||
name = "dashy"
|
||||
tls_secret_name = var.tls_secret_name
|
||||
protected = true # hidden as we use homepage now
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue