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