refactor(tofu): template kubelet args

This commit is contained in:
Vegard Hagen
2025-03-23 20:59:11 +01:00
parent 4c2890c672
commit e7ae041021
5 changed files with 9 additions and 3 deletions
+1
View File
@@ -57,6 +57,7 @@ data "talos_machine_configuration" "this" {
vip = var.cluster.vip
}), each.value.machine_type == "controlplane" ?
templatefile("${path.module}/machine-config/control-plane.yaml.tftpl", {
kubelet = var.cluster.kubelet
api_server = var.cluster.api_server
inline_manifests = jsonencode(terraform_data.cilium_bootstrap_inline_manifests.output)
}) : ""
@@ -1,8 +1,6 @@
machine:
kubelet:
extraArgs:
# Needed for Netbird agent https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#enabling-unsafe-sysctls
allowed-unsafe-sysctls: net.ipv4.conf.all.src_valid_mark
${indent(4, kubelet)}
cluster:
allowSchedulingOnControlPlanes: true
+1
View File
@@ -23,6 +23,7 @@ variable "cluster" {
talos_machine_config_version = optional(string)
proxmox_cluster = string
kubernetes_version = string
kubelet = optional(string)
api_server = optional(string)
cilium = object({
bootstrap_manifest_path = string
@@ -17,6 +17,11 @@ talos_cluster_config = {
bootstrap_manifest_path = "talos/inline-manifests/cilium-install.yaml"
values_file_path = "../../k8s/infra/network/cilium/values.yaml"
}
kubelet = <<-EOT
extraArgs:
# Needed for Netbird agent https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#enabling-unsafe-sysctls
allowed-unsafe-sysctls: net.ipv4.conf.all.src_valid_mark
EOT
api_server = <<-EOT
extraArgs:
oidc-issuer-url: "https://authelia.stonegarden.dev"
+1
View File
@@ -39,6 +39,7 @@ variable "talos_cluster_config" {
talos_machine_config_version = optional(string)
proxmox_cluster = string
kubernetes_version = string
kubelet = optional(string)
api_server = optional(string)
cilium = object({
bootstrap_manifest_path = string