Skip to content

Commit 0c3f8af

Browse files
committed
fix: some test infra stuff and add ping for nodes
1 parent cbba3fa commit 0c3f8af

File tree

7 files changed

+18
-16
lines changed

7 files changed

+18
-16
lines changed

tofu_infra/cloud-init.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ apt:
1010
keyid: DE15B14486CD377B9E876E1A234654DA9A296436
1111
filename: kubernetes.list
1212
crio.list:
13-
source: "deb [signed-by=$KEY_FILE] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/${var.crio_version}/Debian_12/ /"
14-
keyid: 2472D6D0D2F66AF87ABA8DA34D64390375060AA4
13+
source: "deb [signed-by=$KEY_FILE] https://pkgs.k8s.io/addons:/cri-o:/stable:/v${var.kube_version}/deb/ /"
14+
keyid: DE15B14486CD377B9E876E1A234654DA9A296436
1515
filename: crio.list
1616
kubic.list:
1717
source: "deb [signed-by=$KEY_FILE] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_12/ /"

tofu_infra/control-plane.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ resource "hcloud_server" "control-planes" {
33
name = each.value.name
44
image = "debian-12"
55
server_type = each.value.type
6+
location = "nbg1"
7+
68
public_net {
79
ipv6_enabled = true
810
}

tofu_infra/network.tf

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,25 +85,21 @@ resource "hcloud_firewall" "k8s_intern" {
8585
}
8686

8787
resource "hcloud_firewall_attachment" "pub_attachment_worker" {
88-
for_each = hcloud_server.worker
8988
firewall_id = hcloud_firewall.k8s_pub.id
90-
server_ids = [each.value.id]
89+
label_selectors = [ "vm-type=cp", "vm-type=worker" ]
9190
}
9291

9392
resource "hcloud_firewall_attachment" "priv_attachment_worker" {
94-
for_each = hcloud_server.worker
9593
firewall_id = hcloud_firewall.k8s_intern.id
96-
server_ids = [each.value.id]
94+
label_selectors = [ "vm-type=cp", "vm-type=worker" ]
9795
}
9896

9997
resource "hcloud_firewall_attachment" "pub_attachment_cp" {
100-
for_each = hcloud_server.control-planes
10198
firewall_id = hcloud_firewall.k8s_pub.id
102-
server_ids = [each.value.id]
99+
label_selectors = [ "vm-type=cp", "vm-type=worker" ]
103100
}
104101

105102
resource "hcloud_firewall_attachment" "priv_attachment_cp" {
106-
for_each = hcloud_server.control-planes
107103
firewall_id = hcloud_firewall.k8s_intern.id
108-
server_ids = [each.value.id]
104+
label_selectors = [ "vm-type=cp", "vm-type=worker" ]
109105
}

tofu_infra/providers.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ provider "kubectl" {
4242
load_config_file = true
4343
apply_retry_count = 3
4444
config_path = "${path.cwd}/local/kubeconfig"
45-
}
45+
}

tofu_infra/variables.tfvars

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
hcloud_token = "{hcloud api key}"
1+
hcloud_token = "{hcloud api key}"
22

33
# the crio version wanted
4-
# currently still using the suse mirrors so only <= 1.28 is supported
5-
crio_version = "1.28"
4+
# bumped to >1.28, starting with 1.28 there is a repo change. (https://github.com/cri-o/packaging/blob/d12f75b1322d9f8ef90559f51ea55fc09943d3aa/README.md#usage)
5+
crio_version = "1.30"
66

77
# kubernetes version
8-
kube_version = "1.28"
8+
kube_version = "1.30"
99

1010
worker = {
1111
"w-1" = {
@@ -23,7 +23,7 @@ worker = {
2323
}
2424

2525
control-plane = {
26-
"cp1" = {
26+
"cp4" = {
2727
name = "cp-1"
2828
type = "cax11"
2929
},

tofu_infra/worker.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ resource "hcloud_server" "worker" {
33
name = each.value.name
44
image = "debian-12"
55
server_type = each.value.type
6+
location = "nbg1"
7+
68
public_net {
79
ipv6_enabled = true
810
}

upgrade_cluster.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
become: true
55
gather_facts: false
66
tasks:
7+
- name: Example from an Ansible Playbook
8+
ansible.builtin.ping:
79
- ansible.builtin.apt:
810
package:
911
- jq

0 commit comments

Comments
 (0)