2024-07-16 19:13:04 +00:00
|
|
|
module "cluster" {
|
|
|
|
source = "../modules/cluster"
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
helm.template = helm.template
|
|
|
|
}
|
|
|
|
|
2024-07-17 19:43:11 +00:00
|
|
|
talos = {
|
|
|
|
version = "v1.7.5"
|
2024-07-16 19:13:04 +00:00
|
|
|
kubernetes = "v1.30.0"
|
|
|
|
}
|
|
|
|
|
|
|
|
cluster = {
|
|
|
|
name = "tjo-cloud"
|
|
|
|
domain = "k8s.tjo.cloud"
|
|
|
|
oidc = {
|
|
|
|
client_id = var.oidc_client_id
|
|
|
|
issuer_url = var.oidc_issuer_url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
proxmox = {
|
2024-07-17 19:43:11 +00:00
|
|
|
name = "tjo-cloud"
|
|
|
|
url = "https://proxmox.tjo.cloud/api2/json"
|
2024-07-19 20:48:07 +00:00
|
|
|
common_storage = "proxmox-backup-tjo-cloud"
|
2024-07-16 19:13:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tailscale_authkey = var.tailscale_authkey
|
|
|
|
|
|
|
|
allow_scheduling_on_control_planes = true
|
|
|
|
nodes = {
|
|
|
|
pink = {
|
2024-07-19 20:48:07 +00:00
|
|
|
public = true
|
|
|
|
type = "controlplane"
|
|
|
|
host = "hetzner"
|
|
|
|
storage = "local-zfs"
|
|
|
|
cores = 4
|
|
|
|
memory = 4096
|
2024-07-16 19:13:04 +00:00
|
|
|
}
|
|
|
|
purple = {
|
2024-07-19 20:48:07 +00:00
|
|
|
public = true
|
|
|
|
type = "controlplane"
|
|
|
|
host = "hetzner"
|
|
|
|
storage = "local-zfs"
|
|
|
|
cores = 4
|
|
|
|
memory = 4096
|
2024-07-16 19:13:04 +00:00
|
|
|
}
|
|
|
|
violet = {
|
2024-07-19 20:48:07 +00:00
|
|
|
public = true
|
|
|
|
type = "controlplane"
|
|
|
|
host = "hetzner"
|
|
|
|
storage = "local-zfs"
|
|
|
|
cores = 4
|
|
|
|
memory = 4096
|
2024-07-16 19:13:04 +00:00
|
|
|
}
|
|
|
|
blue = {
|
2024-07-19 20:48:07 +00:00
|
|
|
public = false
|
|
|
|
type = "worker"
|
|
|
|
host = "hetzner"
|
|
|
|
storage = "local-zfs"
|
|
|
|
cores = 4
|
|
|
|
memory = 16384
|
2024-07-16 19:13:04 +00:00
|
|
|
}
|
|
|
|
cyan = {
|
2024-07-19 20:48:07 +00:00
|
|
|
public = false
|
|
|
|
type = "worker"
|
|
|
|
host = "hetzner"
|
|
|
|
storage = "local-zfs"
|
|
|
|
cores = 4
|
|
|
|
memory = 16384
|
2024-07-16 19:13:04 +00:00
|
|
|
}
|
|
|
|
green = {
|
2024-07-19 20:48:07 +00:00
|
|
|
public = false
|
|
|
|
type = "worker"
|
|
|
|
host = "hetzner"
|
|
|
|
storage = "local-zfs"
|
|
|
|
cores = 4
|
|
|
|
memory = 16384
|
2024-07-16 19:13:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "local_file" "kubeconfig" {
|
|
|
|
content = module.cluster.kubeconfig
|
|
|
|
filename = "${path.module}/kubeconfig"
|
|
|
|
}
|
|
|
|
|
2024-07-20 11:09:30 +00:00
|
|
|
module "cluster_components" {
|
|
|
|
source = "../modules/cluster-components"
|
2024-07-16 19:13:04 +00:00
|
|
|
|
2024-07-20 11:09:30 +00:00
|
|
|
oidc_issuer_url = var.oidc_issuer_url
|
|
|
|
oidc_client_id = var.oidc_client_id
|
|
|
|
|
|
|
|
digitalocean_token = var.digitalocean_token
|
|
|
|
|
|
|
|
cluster_name = module.cluster.name
|
|
|
|
cluster_domain = module.cluster.domain
|
|
|
|
|
|
|
|
loadbalancer_ips = {
|
|
|
|
hetzner-public = {
|
|
|
|
ipv4 = [for k, node in module.cluster.nodes : node.ipv4 if node.public]
|
|
|
|
ipv6 = [for k, node in module.cluster.nodes : node.ipv6 if node.public]
|
|
|
|
}
|
2024-07-16 19:13:04 +00:00
|
|
|
}
|
|
|
|
}
|