From 780f5ec7b71bd579c9b98009404ec420fd925ede Mon Sep 17 00:00:00 2001 From: Karim Naufal Date: Mon, 21 Mar 2022 21:29:41 +0100 Subject: [PATCH 1/2] fixed metrics-server disable --- init.tf | 2 +- terraform.tfvars.example | 2 +- variables.tf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/init.tf b/init.tf index 3ccc6fe..f50341b 100644 --- a/init.tf +++ b/init.tf @@ -13,7 +13,7 @@ resource "null_resource" "first_control_plane" { token = random_password.k3s_token.result cluster-init = true disable-cloud-controller = true - disable = concat(["local-storage"], local.is_single_node_cluster ? [] : ["servicelb"], var.traefik_enabled ? [] : ["traefik"], var.metric_server_enabled ? [] : ["metric-server"]) + disable = concat(["local-storage"], local.is_single_node_cluster ? [] : ["servicelb"], var.traefik_enabled ? [] : ["traefik"], var.metrics_server_enabled ? [] : ["metrics-server"]) flannel-iface = "eth1" kubelet-arg = "cloud-provider=external" node-ip = module.control_planes[0].private_ipv4_address diff --git a/terraform.tfvars.example b/terraform.tfvars.example index cd00045..4340743 100644 --- a/terraform.tfvars.example +++ b/terraform.tfvars.example @@ -62,7 +62,7 @@ load_balancer_type = "lb11" # traefik_enabled = false # If you want to disable the metric server, you can! By defaults it is enabled. -# metric_server_enabled = false +# metrics_server_enabled = false # If you want to allow non-control-plane workloads to run on the control-plane nodes set "true" below. The default is "false". # Also good for single node clusters. diff --git a/variables.tf b/variables.tf index a5f6b22..2b5a694 100644 --- a/variables.tf +++ b/variables.tf @@ -93,7 +93,7 @@ variable "allow_scheduling_on_control_plane" { description = "Whether to allow non-control-plane workloads to run on the control-plane nodes" } -variable "metric_server_enabled" { +variable "metrics_server_enabled" { type = bool default = true description = "Whether to enable or disbale k3s mertric server" From 2704fa47043a9c16e68d8cb57d0695df193e9f02 Mon Sep 17 00:00:00 2001 From: Karim Naufal Date: Mon, 21 Mar 2022 22:04:48 +0100 Subject: [PATCH 2/2] tweak release process --- .../workflows/{publish-terraform.yaml => publish-release.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{publish-terraform.yaml => publish-release.yaml} (89%) diff --git a/.github/workflows/publish-terraform.yaml b/.github/workflows/publish-release.yaml similarity index 89% rename from .github/workflows/publish-terraform.yaml rename to .github/workflows/publish-release.yaml index 6fccf8f..20b487f 100644 --- a/.github/workflows/publish-terraform.yaml +++ b/.github/workflows/publish-release.yaml @@ -17,5 +17,5 @@ jobs: - uses: ncipollo/release-action@v1 with: generateReleaseNotes: true - name: 'v${{ github.ref_name }}' + name: ${{ github.ref_name }} token: ${{ secrets.GITHUB_TOKEN }}