Skip to content

Commit

Permalink
Revert "Gatekeeper Deployment" (#362)
Browse files Browse the repository at this point in the history
Reverts #358
Need to follow `argocd` as an example to enable, not to have it under
tsb modules but have it independently installed
  • Loading branch information
smarunich authored Mar 27, 2024
1 parent 3c0d5a2 commit 91c8054
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 125 deletions.
36 changes: 0 additions & 36 deletions modules/addons/gatekeeper/main.tf

This file was deleted.

1 change: 0 additions & 1 deletion modules/addons/gatekeeper/manifests/gatekeeper-values.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions modules/addons/gatekeeper/providers.tf

This file was deleted.

18 changes: 0 additions & 18 deletions modules/addons/gatekeeper/variable.tf

This file was deleted.

1 change: 0 additions & 1 deletion modules/tsb/mp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,3 @@ data "kubernetes_service" "tsb" {
}
depends_on = [time_sleep.wait_240_seconds]
}

1 change: 1 addition & 0 deletions modules/tsb/mp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ variable "es_cacert" {




9 changes: 0 additions & 9 deletions terraform-advanced.tfvars.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
},
"tsb-monitoring": {
"enabled": true
},
"gatekeeper": {
"enabled" : true
}
}
}
Expand All @@ -44,9 +41,6 @@
},
"tsb-monitoring": {
"enabled": true
},
"gatekeeper": {
"enabled" : true
}
}
}
Expand All @@ -69,9 +63,6 @@
},
"tsb-monitoring": {
"enabled": true
},
"gatekeeper": {
"enabled" : true
}
}
}
Expand Down
9 changes: 0 additions & 9 deletions terraform-basic.tfvars.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
"addons": {
"argocd": {
"enabled": true
},
"gatekeeper": {
"enabled" : true
}
}
}
Expand All @@ -25,9 +22,6 @@
"addons": {
"argocd": {
"enabled": true
},
"gatekeeper": {
"enabled": true
}
}
}
Expand All @@ -41,9 +35,6 @@
"addons": {
"argocd": {
"enabled": true
},
"gatekeeper": {
"enabled": true
}
}
}
Expand Down
9 changes: 0 additions & 9 deletions tsb/cp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@ module "ratelimit" {
enabled = var.ratelimit_enabled
}

module "gatekeeper" {
source = "../../modules/addons/gatekeeper"
cluster_name = data.terraform_remote_state.infra.outputs.cluster_name
k8s_host = data.terraform_remote_state.infra.outputs.host
k8s_cluster_ca_certificate = data.terraform_remote_state.infra.outputs.cluster_ca_certificate
k8s_client_token = data.terraform_remote_state.k8s_auth.outputs.token
gatekeeper_enabled = local.cluster.tetrate.management_plane ? false : local.cluster.addons.gatekeeper
}

module "tsb_cp" {
source = "../../modules/tsb/cp"
cloud = local.cluster.cloud
Expand Down
12 changes: 0 additions & 12 deletions tsb/cp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ variable "cluster" {
control_plane = optional(bool)
management_plane = optional(bool)
})
addons = object({
gatekeeper = object({
enabled = optional(bool)
})
})
version = optional(string)
workspace = string
})
Expand All @@ -26,9 +21,6 @@ locals {
management_plane = false
}
version = "1.27"
addons = {
gatekeeper = false
}
}
cluster = {
cloud = var.cluster.cloud
Expand All @@ -41,10 +33,6 @@ locals {
}
version = coalesce(var.cluster.version, local.cluster_defaults.version)
workspace = var.cluster.workspace
addons = {
gatekeeper = coalesce(var.cluster.addons.gatekeeper.enabled,local.cluster_defaults.addons.gatekeeper)
}

}
}

Expand Down
11 changes: 1 addition & 10 deletions tsb/mp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ module "es" {
es_version = local.tetrate.es_version
}

module "gatekeeper" {
source = "../../modules/addons/gatekeeper"
cluster_name = data.terraform_remote_state.infra.outputs.cluster_name
k8s_host = data.terraform_remote_state.infra.outputs.host
k8s_cluster_ca_certificate = data.terraform_remote_state.infra.outputs.cluster_ca_certificate
k8s_client_token = data.terraform_remote_state.k8s_auth.outputs.token
gatekeeper_enabled = local.cluster.addons.gatekeeper
}

module "tsb_mp" {
source = "../../modules/tsb/mp"
name_prefix = var.name_prefix
Expand All @@ -62,4 +53,4 @@ module "tsb_mp" {
k8s_host = data.terraform_remote_state.infra.outputs.host
k8s_cluster_ca_certificate = data.terraform_remote_state.infra.outputs.cluster_ca_certificate
k8s_client_token = data.terraform_remote_state.k8s_auth.outputs.token
}
}
12 changes: 0 additions & 12 deletions tsb/mp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ variable "cluster" {
control_plane = optional(bool)
management_plane = optional(bool)
})
addons = object({
gatekeeper = object({
enabled = optional(bool)
})
})
version = optional(string)
workspace = string
})
Expand All @@ -26,9 +21,6 @@ locals {
management_plane = false
}
version = "1.27"
addons = {
gatekeeper = false
}
}
cluster = {
cloud = var.cluster.cloud
Expand All @@ -41,10 +33,6 @@ locals {
}
version = coalesce(var.cluster.version, local.cluster_defaults.version)
workspace = var.cluster.workspace
addons = {
gatekeeper = coalesce(var.cluster.addons.gatekeeper.enabled,local.cluster_defaults.addons.gatekeeper)
}

}
}

Expand Down

0 comments on commit 91c8054

Please sign in to comment.