1
0
Fork 0

terraform_modules/digitalocean_talos_cluster: don't prepare for calico

This commit is contained in:
ryan-distrust.co 2023-05-10 19:23:37 -04:00
parent 42ad0cd6cb
commit 94246b21d0
Signed by untrusted user who does not match committer: ryan
GPG Key ID: 8E401478A3FBEF72
1 changed files with 6 additions and 4 deletions

View File

@ -75,7 +75,7 @@ resource "digitalocean_reserved_ip" "control_plane" {
command = join(" ", ["talosctl", "gen", "config", command = join(" ", ["talosctl", "gen", "config",
"--output-dir=${local.config_directory}", "--output-dir=${local.config_directory}",
"--config-patch-control-plane=@${local.control_plane_patch_labels}", "--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, var.talos_cluster_name,
"https://${self.ip_address}:6443" "https://${self.ip_address}:6443"
]) ])
@ -96,7 +96,7 @@ resource "digitalocean_droplet" "control_plane" {
name = "talos-control-plane" name = "talos-control-plane"
region = data.digitalocean_region.provided.slug region = data.digitalocean_region.provided.slug
image = var.talos_image image = var.talos_image
size = "s-2vcpu-4gb" size = var.control_plane_pool.size
user_data = data.local_file.controlplane.content user_data = data.local_file.controlplane.content
ssh_keys = [digitalocean_ssh_key.dummy.fingerprint] 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] depends_on = [digitalocean_droplet.worker]
provisioner "local-exec" { provisioner "local-exec" {
command = "talosctl --talosconfig ${local.config_directory}/talosconfig kubeconfig -f ${local.config_directory}/kubeconfig" command = "talosctl --talosconfig ${local.config_directory}/talosconfig kubeconfig -f ${local.config_directory}/kubeconfig"
} }
/*
provisioner "local-exec" { 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"
} }
*/
} }