feat: Add GatewayAPI support to cluster bootstrap

This commit is contained in:
Peter 2025-10-29 21:07:54 +01:00
parent 7d3c60325f
commit bd50783229
Signed by: Peter
SSH key fingerprint: SHA256:B5tYaxBExaDm74r1px9iVeZ6F/ZDiyiy9SbBqfZYrvg
6 changed files with 11 additions and 2 deletions

View file

@ -8,6 +8,7 @@ locals {
cluster_name = "k8s-wheatley" cluster_name = "k8s-wheatley"
kubernetes_version = "1.34.1" kubernetes_version = "1.34.1"
talos_version = "1.11.3" talos_version = "1.11.3"
gateway_api_version = "1.4.0"
cilium_version = "1.14.1" cilium_version = "1.14.1"
ipv4_gateway = "10.13.38.1" ipv4_gateway = "10.13.38.1"
cluster_endpoint_ip = "10.13.38.10" cluster_endpoint_ip = "10.13.38.10"
@ -152,6 +153,7 @@ module "talos-bootstrap" {
node_config = { node_config = {
ipv4_gateway = local.ipv4_gateway ipv4_gateway = local.ipv4_gateway
talos_version = local.talos_version talos_version = local.talos_version
gateway_api_version = local.gateway_api_version
cilium_version = local.cilium_version cilium_version = local.cilium_version
cluster_name = local.cluster_name cluster_name = local.cluster_name
kubernetes_version = local.kubernetes_version kubernetes_version = local.kubernetes_version

View file

@ -55,6 +55,7 @@ resource "talos_machine_configuration_apply" "config_apply_cp" {
node_name = format("%s.wheatley.in", var.node_config.proxmox_node) node_name = format("%s.wheatley.in", var.node_config.proxmox_node)
machine_type = each.value.type machine_type = each.value.type
talos_version = var.node_config.talos_version talos_version = var.node_config.talos_version
gateway-api_version = var.node_config.gateway_api_version
cilium_version = var.node_config.cilium_version cilium_version = var.node_config.cilium_version
cilium_install_file = file("${path.module}/templates/cilium-install.yaml.tmpl") cilium_install_file = file("${path.module}/templates/cilium-install.yaml.tmpl")
}) })
@ -79,6 +80,7 @@ resource "talos_machine_configuration_apply" "config_apply_worker" {
node_name = format("%s.wheatley.in", var.node_config.proxmox_node) node_name = format("%s.wheatley.in", var.node_config.proxmox_node)
machine_type = each.value.type machine_type = each.value.type
talos_version = var.node_config.talos_version talos_version = var.node_config.talos_version
gateway-api_version = var.node_config.gateway_api_version
cilium_version = var.node_config.cilium_version cilium_version = var.node_config.cilium_version
cilium_install_file = file("${path.module}/templates/cilium-install.yaml.tmpl") cilium_install_file = file("${path.module}/templates/cilium-install.yaml.tmpl")
}) })

View file

@ -94,3 +94,5 @@ spec:
- gatewayAPI.enableAlpn=true - gatewayAPI.enableAlpn=true
- --set - --set
- gatewayAPI.enableAppProtocol=true - gatewayAPI.enableAppProtocol=true
- --set
- hubble.relay.enabled=true

View file

@ -8,13 +8,11 @@ machine:
hostname: ${hostname} hostname: ${hostname}
nameservers: nameservers:
- 10.13.37.2 - 10.13.37.2
%{ if machine_type == "controlplane" }
interfaces: interfaces:
- interface: eth0 - interface: eth0
dhcp: false dhcp: false
vip: vip:
ip: ${vip_address} ip: ${vip_address}
%{ endif }
kubelet: kubelet:
extraArgs: extraArgs:
pod-max-pids: 1000 pod-max-pids: 1000
@ -37,6 +35,8 @@ cluster:
name: none name: none
proxy: proxy:
disabled: true disabled: true
extraManifests:
- https://github.com/kubernetes-sigs/gateway-api/releases/download/v${gateway-api_version}/standard-install.yaml
inlineManifests: inlineManifests:
- name: cilium-bootstrap - name: cilium-bootstrap
contents: | contents: |

View file

@ -30,6 +30,8 @@ cluster:
name: none name: none
proxy: proxy:
disabled: true disabled: true
extraManifests:
- https://github.com/kubernetes-sigs/gateway-api/releases/download/v${gateway-api_version}/standard-install.yaml
inlineManifests: inlineManifests:
- name: cilium-bootstrap - name: cilium-bootstrap
contents: | contents: |

View file

@ -3,6 +3,7 @@ variable "node_config" {
type = object({ type = object({
ipv4_gateway = string ipv4_gateway = string
talos_version = string talos_version = string
gateway_api_version = string
cilium_version = string cilium_version = string
cluster_name = string cluster_name = string
kubernetes_version = string kubernetes_version = string