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 = [
data.template_file.core_user.rendered
templatefile(
"${path.module}/configs/core-user.yaml.tmpl",
{
ssh_keys = jsonencode(concat(var.ssh_keys, [tls_private_key.provisioning.public_key_openssh]))
}
)
]
}
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]))
}
}

View file

@ -18,7 +18,7 @@ resource "hcloud_load_balancer_target" "k8s_lb_target" {
}
resource "hcloud_managed_certificate" "icb4dc0de_20230613_001" {
name = "icb4dc0de_20230613_001"
name = "icb4dc0de_20230613_001"
domain_names = [
"icb4dc0.de",
"*.icb4dc0.de",
@ -27,7 +27,7 @@ resource "hcloud_managed_certificate" "icb4dc0de_20230613_001" {
"*.prskr.icb4dc0.de",
"*.fider.icb4dc0.de",
"*.ide.icb4dc0.de",
]
]
labels = {
}
}

View file

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

View file

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