refactor: move to K8s state and move machines to Helsinki
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Peter 2023-10-20 14:40:45 +02:00
parent f899d3f415
commit 73da8be447
No known key found for this signature in database
4 changed files with 17 additions and 32 deletions

View file

@ -104,13 +104,11 @@ data "ct_config" "machine-ignitions" {
} }
) )
snippets = [ snippets = [
data.template_file.core_user.rendered templatefile(
] "${path.module}/configs/core-user.yaml.tmpl",
} {
data "template_file" "core_user" {
template = file("${path.module}/configs/core-user.yaml.tmpl")
vars = {
ssh_keys = jsonencode(concat(var.ssh_keys, [tls_private_key.provisioning.public_key_openssh])) ssh_keys = jsonencode(concat(var.ssh_keys, [tls_private_key.provisioning.public_key_openssh]))
} }
)
]
} }

View file

@ -2,12 +2,10 @@
terraform { terraform {
required_version = ">= 0.14" required_version = ">= 0.14"
cloud { backend "kubernetes" {
organization = "pkurfer" secret_suffix = "state"
config_path = "~/.kube/hetzner.yaml"
workspaces { namespace = "infrastructure"
name = "hcloud-infra"
}
} }
required_providers { required_providers {
@ -19,10 +17,7 @@ terraform {
source = "poseidon/ct" source = "poseidon/ct"
version = "0.11.0" version = "0.11.0"
} }
template = {
source = "hashicorp/template"
version = "~> 2.2.0"
}
null = { null = {
source = "hashicorp/null" source = "hashicorp/null"
version = "~> 3.2.1" version = "~> 3.2.1"

View file

@ -7,14 +7,6 @@ k3os_workers = {
location = "hel1" location = "hel1"
} }
"worker2-gen4" = {
backups = false
node_type = "worker"
server_type = "cax21"
private_ip = "172.23.2.21"
location = "fsn1"
}
"w2-cax21-hel1-gen5" = { "w2-cax21-hel1-gen5" = {
backups = false backups = false
node_type = "worker" node_type = "worker"
@ -23,12 +15,12 @@ k3os_workers = {
location = "hel1" location = "hel1"
} }
"worker3-gen4" = { "w3-cax21-hel1-gen5" = {
backups = false backups = false
node_type = "worker" node_type = "worker"
server_type = "cax21" server_type = "cax21"
private_ip = "172.23.2.22" private_ip = "172.23.2.25"
location = "fsn1" location = "hel1"
} }
} }