mirror of
https://github.com/lukaszraczylo/rpi-home-cluster-setup.git
synced 2026-10-13 00:48:44 +00:00
Group variables by logic / function.
This commit is contained in:
@@ -72,7 +72,7 @@ resource "kubernetes_service" "adguard_svc" {
|
||||
port = 3000
|
||||
target_port = 3000
|
||||
}
|
||||
load_balancer_ip = "${var.network_subnet}.${var.adguard_catchall_host}"
|
||||
load_balancer_ip = "${var.network_subnet}.${var.net_hosts.adguard_catchall}"
|
||||
selector = {
|
||||
"app" : "adguard"
|
||||
}
|
||||
@@ -97,7 +97,7 @@ resource "kubernetes_service" "adguard_udp_svc" {
|
||||
target_port = 53
|
||||
protocol = "UDP"
|
||||
}
|
||||
load_balancer_ip = "${var.network_subnet}.${var.adguard_host}"
|
||||
load_balancer_ip = "${var.network_subnet}.${var.net_hosts.adguard}"
|
||||
selector = {
|
||||
"app" : "adguard"
|
||||
}
|
||||
@@ -122,7 +122,7 @@ resource "kubernetes_persistent_volume" "adguard_shared_nfs" {
|
||||
access_modes = ["ReadWriteMany"]
|
||||
persistent_volume_source {
|
||||
host_path {
|
||||
path = var.nfs_adguard_path
|
||||
path = var.nfs_storage.adguard
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ resource "kubernetes_persistent_volume" "etc_backup_shared_nfs" {
|
||||
access_modes = ["ReadWriteMany"]
|
||||
persistent_volume_source {
|
||||
host_path {
|
||||
path = "${var.nfs_general_path}/etcd-backup"
|
||||
path = "${var.nfs_storage.general}/etcd-backup"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ resource "kubernetes_service" "torrent_svc" {
|
||||
port = 3000
|
||||
target_port = 3000
|
||||
}
|
||||
load_balancer_ip = "${var.network_subnet}.${var.rtorrent_rpc_host}"
|
||||
load_balancer_ip = "${var.network_subnet}.${var.net_hosts.torrent_rpc}"
|
||||
selector = {
|
||||
"app" : "torrent"
|
||||
}
|
||||
@@ -91,7 +91,7 @@ resource "kubernetes_persistent_volume" "torrent_shared_nfs" {
|
||||
access_modes = ["ReadWriteMany"]
|
||||
persistent_volume_source {
|
||||
host_path {
|
||||
path = var.nfs_torrent_path
|
||||
path = var.nfs_storage.torrent
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,7 +154,7 @@ resource "kubernetes_deployment" "flood-torrent" {
|
||||
name = "FLOOD_DISABLE_AUTH"
|
||||
value = "true"
|
||||
}
|
||||
args = ["--rthost", "${var.network_subnet}.${var.rtorrent_rpc_host}",
|
||||
args = ["--rthost", "${var.network_subnet}.${var.net_hosts.torrent_rpc}",
|
||||
"--rtport", "5000", "-e", "HOME=/config", "--auth", "none", "-d", "/config/flood",
|
||||
"--allowedpath", "/config",
|
||||
"--allowedpath", "/data",
|
||||
|
||||
@@ -11,7 +11,7 @@ resource "helm_release" "traefik" {
|
||||
|
||||
set {
|
||||
name = "service.spec.loadBalancerIP"
|
||||
value = "${var.network_subnet}.${var.traefik_host}"
|
||||
value = "${var.network_subnet}.${var.net_hosts.traefik}"
|
||||
}
|
||||
|
||||
values = [
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
variable "network_subnet" {}
|
||||
variable "rtorrent_rpc_host" {}
|
||||
variable "nfs_general_path" {}
|
||||
variable "nfs_torrent_path" {}
|
||||
variable "nfs_adguard_path" {}
|
||||
variable "adguard_host" {}
|
||||
variable "adguard_catchall_host" {}
|
||||
variable "traefik_host" {}
|
||||
variable "nfs_storage" {}
|
||||
variable "net_hosts" {}
|
||||
variable "traefik_api_key" {}
|
||||
variable "github_user" {}
|
||||
variable "github_pat" {}
|
||||
+12
-7
@@ -1,13 +1,18 @@
|
||||
# Variables used for barebone kubernetes setup
|
||||
network_subnet = "192.168.50"
|
||||
rtorrent_rpc_host = "245"
|
||||
adguard_host = "240"
|
||||
adguard_catchall_host = "249"
|
||||
traefik_host = "234"
|
||||
|
||||
nfs_general_path = "/media/nfs"
|
||||
nfs_torrent_path = "/mnt/drobo-storage/docker-volumes/torrent"
|
||||
nfs_adguard_path = "/mnt/drobo-storage/docker-volumes/adguard"
|
||||
net_hosts = {
|
||||
adguard = "240"
|
||||
adguard_catchall = "249"
|
||||
traefik = "234"
|
||||
torrent_rpc = "245"
|
||||
}
|
||||
|
||||
nfs_storage = {
|
||||
general = "/media/nfs"
|
||||
torrent = "/mnt/drobo-storage/docker-volumes/torrent"
|
||||
adguard = "/mnt/drobo-storage/docker-volumes/adguard"
|
||||
}
|
||||
|
||||
# ENV variable: TRAEFIK_API_KEY sets traefik_api_key
|
||||
# ENV variable: GH_USER, GH_PAT for authentication with private containers
|
||||
Reference in New Issue
Block a user