From f036276d4c2aa19adfb78fa8e9f72b9ae526cc08 Mon Sep 17 00:00:00 2001 From: erikvveen <38631386+erikvveen@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:37:02 +0100 Subject: [PATCH] all corrections, but without the suggested removed changes due to PR171 --- 00-locals.tf | 19 +++++++------------ 00-variables.tf | 6 ++++++ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/00-locals.tf b/00-locals.tf index 8ec4723..3efc832 100644 --- a/00-locals.tf +++ b/00-locals.tf @@ -29,19 +29,17 @@ locals { id = var.cluster_id, clusterName = var.cluster_name, apiServer = { - extraArgs = { - cloud-provider = "external" - enable-admission-plugins = "MutatingAdmissionWebhook,ValidatingAdmissionWebhook, ServiceAccount" - }, certSANs = [ module.elb_k8s_elb.elb_dns_name, - ] + ], + extraArgs = { + enable-admission-plugins = var.admission_plugins + } }, controllerManager = { extraArgs = { allocate-node-cidrs = var.allocate_node_cidrs cloud-provider = "external" - leader-elect = true } }, network = { @@ -77,8 +75,7 @@ locals { } } - # Used to configure Cilium Kube-Proxy replacement - + # Used to configure Cilium Kube-Proxy replacement config_cilium_patch = { cluster = { proxy = { @@ -94,10 +91,8 @@ locals { } } } - - - - config_patches_common = [ + + config_patches_common = [ for path in var.config_patch_files : file(path) ] diff --git a/00-variables.tf b/00-variables.tf index 84ddd37..3e6c264 100644 --- a/00-variables.tf +++ b/00-variables.tf @@ -166,4 +166,10 @@ variable "config_patch_files" { default = [] description = "Path to talos config path files that applies to all nodes" type = list(string) +} + +variable "admission_plugins" { + description = "List of admission plugins to enable" + type = list(string) + default = ["MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ServiceAccount"] } \ No newline at end of file