Skip to content

Commit

Permalink
feat: Add support for gVisor per node pool
Browse files Browse the repository at this point in the history
  • Loading branch information
LukaszCzarnotaSabre committed Sep 21, 2021
1 parent bc41a98 commit 4d1f5ba
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 20 deletions.
4 changes: 2 additions & 2 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,9 @@ resource "google_container_node_pool" "pools" {
}
{% if beta_cluster %}
dynamic "sandbox_config" {
for_each = local.cluster_sandbox_enabled

for_each = tobool((lookup(each.value, "sandbox_enabled", var.sandbox_enabled))) ? ["gvisor"] : []
content {

sandbox_type = sandbox_config.value
}
}
Expand Down
2 changes: 0 additions & 2 deletions autogen/main/main.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ locals {

cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }]

cluster_sandbox_enabled = var.sandbox_enabled ? ["gvisor"] : []

{% endif %}

cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{
Expand Down
4 changes: 2 additions & 2 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,9 @@ resource "google_container_node_pool" "pools" {
}
}
dynamic "sandbox_config" {
for_each = local.cluster_sandbox_enabled

for_each = tobool((lookup(each.value, "sandbox_enabled", var.sandbox_enabled))) ? ["gvisor"] : []
content {

sandbox_type = sandbox_config.value
}
}
Expand Down
2 changes: 0 additions & 2 deletions modules/beta-private-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ locals {

cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }]

cluster_sandbox_enabled = var.sandbox_enabled ? ["gvisor"] : []


cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{
security_group = var.authenticator_security_group
Expand Down
4 changes: 2 additions & 2 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,9 @@ resource "google_container_node_pool" "pools" {
}
}
dynamic "sandbox_config" {
for_each = local.cluster_sandbox_enabled

for_each = tobool((lookup(each.value, "sandbox_enabled", var.sandbox_enabled))) ? ["gvisor"] : []
content {

sandbox_type = sandbox_config.value
}
}
Expand Down
2 changes: 0 additions & 2 deletions modules/beta-private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ locals {

cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }]

cluster_sandbox_enabled = var.sandbox_enabled ? ["gvisor"] : []


cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{
security_group = var.authenticator_security_group
Expand Down
4 changes: 2 additions & 2 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,9 @@ resource "google_container_node_pool" "pools" {
}
}
dynamic "sandbox_config" {
for_each = local.cluster_sandbox_enabled

for_each = tobool((lookup(each.value, "sandbox_enabled", var.sandbox_enabled))) ? ["gvisor"] : []
content {

sandbox_type = sandbox_config.value
}
}
Expand Down
2 changes: 0 additions & 2 deletions modules/beta-public-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ locals {

cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }]

cluster_sandbox_enabled = var.sandbox_enabled ? ["gvisor"] : []


cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{
security_group = var.authenticator_security_group
Expand Down
4 changes: 2 additions & 2 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,9 @@ resource "google_container_node_pool" "pools" {
}
}
dynamic "sandbox_config" {
for_each = local.cluster_sandbox_enabled

for_each = tobool((lookup(each.value, "sandbox_enabled", var.sandbox_enabled))) ? ["gvisor"] : []
content {

sandbox_type = sandbox_config.value
}
}
Expand Down
2 changes: 0 additions & 2 deletions modules/beta-public-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ locals {

cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }]

cluster_sandbox_enabled = var.sandbox_enabled ? ["gvisor"] : []


cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{
security_group = var.authenticator_security_group
Expand Down

0 comments on commit 4d1f5ba

Please sign in to comment.