From 94246b21d0887b3a2954aadaa2c1c4a710144718 Mon Sep 17 00:00:00 2001 From: "ryan-distrust.co" Date: Wed, 10 May 2023 19:23:37 -0400 Subject: [PATCH] terraform_modules/digitalocean_talos_cluster: don't prepare for calico --- terraform_modules/digitalocean_talos_cluster/main.tf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/terraform_modules/digitalocean_talos_cluster/main.tf b/terraform_modules/digitalocean_talos_cluster/main.tf index 03a0303..26ea1f5 100644 --- a/terraform_modules/digitalocean_talos_cluster/main.tf +++ b/terraform_modules/digitalocean_talos_cluster/main.tf @@ -75,7 +75,7 @@ resource "digitalocean_reserved_ip" "control_plane" { command = join(" ", ["talosctl", "gen", "config", "--output-dir=${local.config_directory}", "--config-patch-control-plane=@${local.control_plane_patch_labels}", - "--config-patch-control-plane=@${local.control_plane_patch_cni}", + # "--config-patch-control-plane=@${local.control_plane_patch_cni}", var.talos_cluster_name, "https://${self.ip_address}:6443" ]) @@ -96,7 +96,7 @@ resource "digitalocean_droplet" "control_plane" { name = "talos-control-plane" region = data.digitalocean_region.provided.slug image = var.talos_image - size = "s-2vcpu-4gb" + size = var.control_plane_pool.size user_data = data.local_file.controlplane.content ssh_keys = [digitalocean_ssh_key.dummy.fingerprint] @@ -157,14 +157,16 @@ resource "null_resource" "init-cluster" { } */ -resource "null_resource" "configure_calico" { +resource "null_resource" "generate_kubeconfig" { depends_on = [digitalocean_droplet.worker] provisioner "local-exec" { command = "talosctl --talosconfig ${local.config_directory}/talosconfig kubeconfig -f ${local.config_directory}/kubeconfig" } + /* provisioner "local-exec" { - command = "kubectl --kubeconfig ${local.config_directory}/kubeconfig -n kube-system create configmap calico-config --from-literal=kubernetes_service_host=${digitalocean_reserved_ip.control_plane.ip_address} --from-literal=kubernetes_service_port=6443" + command = "kubectl --kubeconfig ${local.config_directory}/kubeconfig -n kube-system create configmap calico-machine-config --from-literal=kubernetes_service_host=${digitalocean_reserved_ip.control_plane.ip_address} --from-literal=kubernetes_service_port=6443" } + */ }