mirror of
https://github.com/outbackdingo/homelab-v.git
synced 2026-08-25 07:10:14 +00:00
refactor(tofu): template kubelet args
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user