refactor: move to K8s state and move machines to Helsinki
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f899d3f415
commit
73da8be447
4 changed files with 17 additions and 32 deletions
|
@ -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",
|
||||||
|
{
|
||||||
|
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]))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ resource "hcloud_load_balancer_target" "k8s_lb_target" {
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "hcloud_managed_certificate" "icb4dc0de_20230613_001" {
|
resource "hcloud_managed_certificate" "icb4dc0de_20230613_001" {
|
||||||
name = "icb4dc0de_20230613_001"
|
name = "icb4dc0de_20230613_001"
|
||||||
domain_names = [
|
domain_names = [
|
||||||
"icb4dc0.de",
|
"icb4dc0.de",
|
||||||
"*.icb4dc0.de",
|
"*.icb4dc0.de",
|
||||||
|
@ -27,7 +27,7 @@ resource "hcloud_managed_certificate" "icb4dc0de_20230613_001" {
|
||||||
"*.prskr.icb4dc0.de",
|
"*.prskr.icb4dc0.de",
|
||||||
"*.fider.icb4dc0.de",
|
"*.fider.icb4dc0.de",
|
||||||
"*.ide.icb4dc0.de",
|
"*.ide.icb4dc0.de",
|
||||||
]
|
]
|
||||||
labels = {
|
labels = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,11 @@
|
||||||
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 {
|
||||||
hcloud = {
|
hcloud = {
|
||||||
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue