From f93a07b2ddea93a3f35dc556140060e6b4efd644 Mon Sep 17 00:00:00 2001 From: Romain GERARD Date: Tue, 19 Apr 2022 14:20:53 +0200 Subject: [PATCH] Revert "feat: add new tag to cloud providers" This reverts commit 1303e2e668d7008c62236bf4aa2f6551f6e2eafd. --- lib/aws/bootstrap/eks-master-cluster.j2.tf | 3 +-- lib/aws/bootstrap/tf-default-vars.j2.tf | 6 ------ lib/digitalocean/bootstrap/ks-locals.j2.tf | 3 +-- lib/digitalocean/bootstrap/tf-default-vars.j2.tf | 6 ------ lib/scaleway/bootstrap/ks-locals.j2.tf | 3 +-- lib/scaleway/bootstrap/tf-default-vars.j2.tf | 6 ------ src/cloud_provider/aws/kubernetes/mod.rs | 1 - src/cloud_provider/scaleway/kubernetes/mod.rs | 1 - 8 files changed, 3 insertions(+), 26 deletions(-) diff --git a/lib/aws/bootstrap/eks-master-cluster.j2.tf b/lib/aws/bootstrap/eks-master-cluster.j2.tf index 9a5e215a..c8974174 100644 --- a/lib/aws/bootstrap/eks-master-cluster.j2.tf +++ b/lib/aws/bootstrap/eks-master-cluster.j2.tf @@ -6,9 +6,8 @@ locals { locals { tags_common = { - ClusterId = var.kubernetes_full_cluster_id + ClusterId = var.kubernetes_cluster_id ClusterName = var.kubernetes_cluster_name, - OrganizationId = var.organization_id, Region = var.region creationDate = time_static.on_cluster_create.rfc3339 {% if resource_expiration_in_seconds is defined %}ttl = var.resource_expiration_in_seconds{% endif %} diff --git a/lib/aws/bootstrap/tf-default-vars.j2.tf b/lib/aws/bootstrap/tf-default-vars.j2.tf index b9517338..cf296e4d 100644 --- a/lib/aws/bootstrap/tf-default-vars.j2.tf +++ b/lib/aws/bootstrap/tf-default-vars.j2.tf @@ -111,12 +111,6 @@ variable "eks_k8s_versions" { type = map(string) } -variable "kubernetes_full_cluster_id" { - description = "Kubernetes full cluster id" - default = "{{ kubernetes_full_cluster_id }}" - type = string -} - variable "kubernetes_cluster_id" { description = "Kubernetes cluster id" default = "{{ kubernetes_cluster_id }}" diff --git a/lib/digitalocean/bootstrap/ks-locals.j2.tf b/lib/digitalocean/bootstrap/ks-locals.j2.tf index 03a1fdb5..1f4da11e 100644 --- a/lib/digitalocean/bootstrap/ks-locals.j2.tf +++ b/lib/digitalocean/bootstrap/ks-locals.j2.tf @@ -1,8 +1,7 @@ locals { tags_ks = { - ClusterId = var.kubernetes_full_cluster_id + ClusterId = var.kubernetes_cluster_id ClusterName = var.kubernetes_cluster_name - OrganizationId = var.organization_id, Region = var.region creationDate = time_static.on_cluster_create.rfc3339 {% if resource_expiration_in_seconds is defined %}ttl = var.resource_expiration_in_seconds{% endif %} diff --git a/lib/digitalocean/bootstrap/tf-default-vars.j2.tf b/lib/digitalocean/bootstrap/tf-default-vars.j2.tf index 64e1144b..35d00f8c 100644 --- a/lib/digitalocean/bootstrap/tf-default-vars.j2.tf +++ b/lib/digitalocean/bootstrap/tf-default-vars.j2.tf @@ -64,12 +64,6 @@ variable "vpc_cidr_set" { type = string } -variable "kubernetes_full_cluster_id" { - description = "Kubernetes full cluster id" - default = "{{ kubernetes_full_cluster_id }}" - type = string -} - variable "kubernetes_cluster_id" { description = "Kubernetes cluster name" default = "{{ doks_cluster_id }}" diff --git a/lib/scaleway/bootstrap/ks-locals.j2.tf b/lib/scaleway/bootstrap/ks-locals.j2.tf index f06db392..3f69d9e2 100644 --- a/lib/scaleway/bootstrap/ks-locals.j2.tf +++ b/lib/scaleway/bootstrap/ks-locals.j2.tf @@ -1,8 +1,7 @@ locals { tags_ks = { - ClusterId = var.kubernetes_full_cluster_id + ClusterId = var.kubernetes_cluster_id ClusterName = var.kubernetes_cluster_name - OrganizationId = var.organization_id, Region = var.region creationDate = time_static.on_cluster_create.rfc3339 {% if resource_expiration_in_seconds is defined %}ttl = var.resource_expiration_in_seconds{% endif %} diff --git a/lib/scaleway/bootstrap/tf-default-vars.j2.tf b/lib/scaleway/bootstrap/tf-default-vars.j2.tf index 0502aa85..73900b51 100644 --- a/lib/scaleway/bootstrap/tf-default-vars.j2.tf +++ b/lib/scaleway/bootstrap/tf-default-vars.j2.tf @@ -69,12 +69,6 @@ variable "scaleway_secret_key" { # Kubernetes -variable "kubernetes_full_cluster_id" { - description = "Kubernetes full cluster id" - default = "{{ kubernetes_full_cluster_id }}" - type = string -} - variable "kubernetes_cluster_id" { description = "Kubernetes cluster id" default = "{{ kubernetes_cluster_id }}" diff --git a/src/cloud_provider/aws/kubernetes/mod.rs b/src/cloud_provider/aws/kubernetes/mod.rs index 5b6936f5..7e6b3077 100644 --- a/src/cloud_provider/aws/kubernetes/mod.rs +++ b/src/cloud_provider/aws/kubernetes/mod.rs @@ -498,7 +498,6 @@ impl EKS { context.insert("eks_cidr_subnet", &eks_cidr_subnet); context.insert("kubernetes_cluster_name", &self.name()); context.insert("kubernetes_cluster_id", self.id()); - context.insert("kubernetes_full_cluster_id", self.context.cluster_id()); context.insert("eks_region_cluster_id", region_cluster_id.as_str()); context.insert("eks_worker_nodes", &self.nodes_groups); context.insert("eks_zone_a_subnet_blocks_private", &eks_zone_a_subnet_blocks_private); diff --git a/src/cloud_provider/scaleway/kubernetes/mod.rs b/src/cloud_provider/scaleway/kubernetes/mod.rs index bfc48a0e..cb7fecd1 100644 --- a/src/cloud_provider/scaleway/kubernetes/mod.rs +++ b/src/cloud_provider/scaleway/kubernetes/mod.rs @@ -468,7 +468,6 @@ impl Kapsule { // Kubernetes context.insert("test_cluster", &self.context.is_test_cluster()); - context.insert("kubernetes_full_cluster_id", self.context().cluster_id()); context.insert("kubernetes_cluster_id", self.id()); context.insert("kubernetes_cluster_name", self.cluster_name().as_str()); context.insert("kubernetes_cluster_version", self.version());