Skip to content

Commit dbb57a2

Browse files
authored
feat!: support for enabling image streaming at cluster level (#1696)
1 parent ae26016 commit dbb57a2

File tree

22 files changed

+102
-0
lines changed

22 files changed

+102
-0
lines changed

autogen/main/cluster.tf.tmpl

+10
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,16 @@ resource "google_container_cluster" "primary" {
546546
topic = var.notification_config_topic
547547
}
548548
}
549+
{% if beta_cluster and autopilot_cluster != true %}
550+
551+
node_pool_defaults {
552+
node_config_defaults {
553+
gcfs_config {
554+
enabled = var.enable_gcfs
555+
}
556+
}
557+
}
558+
{% endif %}
549559
}
550560
{% if autopilot_cluster != true %}
551561
/******************************************

autogen/main/variables.tf.tmpl

+6
Original file line numberDiff line numberDiff line change
@@ -800,5 +800,11 @@ variable "enable_identity_service" {
800800
description = "Enable the Identity Service component, which allows customers to use external identity providers with the K8S API."
801801
default = false
802802
}
803+
804+
variable "enable_gcfs" {
805+
type = bool
806+
description = "Enable image streaming on cluster level."
807+
default = false
808+
}
803809
{% endif %}
804810
{% endif %}

autogen/safer-cluster/main.tf.tmpl

+2
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,6 @@ module "gke" {
198198
notification_config_topic = var.notification_config_topic
199199

200200
timeouts = var.timeouts
201+
202+
enable_gcfs = var.enable_gcfs
201203
}

autogen/safer-cluster/variables.tf.tmpl

+6
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,12 @@ variable "timeouts" {
485485
}
486486
}
487487

488+
variable "enable_gcfs" {
489+
type = bool
490+
description = "Enable image streaming on cluster level."
491+
default = false
492+
}
493+
488494
variable "enable_mesh_certificates" {
489495
type = bool
490496
default = false

modules/beta-private-cluster-update-variant/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ Then perform the following commands on the root folder:
192192
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | `bool` | `false` | no |
193193
| enable\_confidential\_nodes | An optional flag to enable confidential node config. | `bool` | `false` | no |
194194
| enable\_cost\_allocation | Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery | `bool` | `false` | no |
195+
| enable\_gcfs | Enable image streaming on cluster level. | `bool` | `false` | no |
195196
| enable\_identity\_service | Enable the Identity Service component, which allows customers to use external identity providers with the K8S API. | `bool` | `false` | no |
196197
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | `bool` | `false` | no |
197198
| enable\_kubernetes\_alpha | Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days. | `bool` | `false` | no |

modules/beta-private-cluster-update-variant/cluster.tf

+8
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,14 @@ resource "google_container_cluster" "primary" {
466466
topic = var.notification_config_topic
467467
}
468468
}
469+
470+
node_pool_defaults {
471+
node_config_defaults {
472+
gcfs_config {
473+
enabled = var.enable_gcfs
474+
}
475+
}
476+
}
469477
}
470478
/******************************************
471479
Create Container Cluster node pools

modules/beta-private-cluster-update-variant/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -757,3 +757,9 @@ variable "enable_identity_service" {
757757
description = "Enable the Identity Service component, which allows customers to use external identity providers with the K8S API."
758758
default = false
759759
}
760+
761+
variable "enable_gcfs" {
762+
type = bool
763+
description = "Enable image streaming on cluster level."
764+
default = false
765+
}

modules/beta-private-cluster/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ Then perform the following commands on the root folder:
170170
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | `bool` | `false` | no |
171171
| enable\_confidential\_nodes | An optional flag to enable confidential node config. | `bool` | `false` | no |
172172
| enable\_cost\_allocation | Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery | `bool` | `false` | no |
173+
| enable\_gcfs | Enable image streaming on cluster level. | `bool` | `false` | no |
173174
| enable\_identity\_service | Enable the Identity Service component, which allows customers to use external identity providers with the K8S API. | `bool` | `false` | no |
174175
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | `bool` | `false` | no |
175176
| enable\_kubernetes\_alpha | Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days. | `bool` | `false` | no |

modules/beta-private-cluster/cluster.tf

+8
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,14 @@ resource "google_container_cluster" "primary" {
466466
topic = var.notification_config_topic
467467
}
468468
}
469+
470+
node_pool_defaults {
471+
node_config_defaults {
472+
gcfs_config {
473+
enabled = var.enable_gcfs
474+
}
475+
}
476+
}
469477
}
470478
/******************************************
471479
Create Container Cluster node pools

modules/beta-private-cluster/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -757,3 +757,9 @@ variable "enable_identity_service" {
757757
description = "Enable the Identity Service component, which allows customers to use external identity providers with the K8S API."
758758
default = false
759759
}
760+
761+
variable "enable_gcfs" {
762+
type = bool
763+
description = "Enable image streaming on cluster level."
764+
default = false
765+
}

modules/beta-public-cluster-update-variant/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ Then perform the following commands on the root folder:
185185
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | `bool` | `false` | no |
186186
| enable\_confidential\_nodes | An optional flag to enable confidential node config. | `bool` | `false` | no |
187187
| enable\_cost\_allocation | Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery | `bool` | `false` | no |
188+
| enable\_gcfs | Enable image streaming on cluster level. | `bool` | `false` | no |
188189
| enable\_identity\_service | Enable the Identity Service component, which allows customers to use external identity providers with the K8S API. | `bool` | `false` | no |
189190
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | `bool` | `false` | no |
190191
| enable\_kubernetes\_alpha | Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days. | `bool` | `false` | no |

modules/beta-public-cluster-update-variant/cluster.tf

+8
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,14 @@ resource "google_container_cluster" "primary" {
447447
topic = var.notification_config_topic
448448
}
449449
}
450+
451+
node_pool_defaults {
452+
node_config_defaults {
453+
gcfs_config {
454+
enabled = var.enable_gcfs
455+
}
456+
}
457+
}
450458
}
451459
/******************************************
452460
Create Container Cluster node pools

modules/beta-public-cluster-update-variant/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -727,3 +727,9 @@ variable "enable_identity_service" {
727727
description = "Enable the Identity Service component, which allows customers to use external identity providers with the K8S API."
728728
default = false
729729
}
730+
731+
variable "enable_gcfs" {
732+
type = bool
733+
description = "Enable image streaming on cluster level."
734+
default = false
735+
}

modules/beta-public-cluster/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ Then perform the following commands on the root folder:
163163
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | `bool` | `false` | no |
164164
| enable\_confidential\_nodes | An optional flag to enable confidential node config. | `bool` | `false` | no |
165165
| enable\_cost\_allocation | Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery | `bool` | `false` | no |
166+
| enable\_gcfs | Enable image streaming on cluster level. | `bool` | `false` | no |
166167
| enable\_identity\_service | Enable the Identity Service component, which allows customers to use external identity providers with the K8S API. | `bool` | `false` | no |
167168
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | `bool` | `false` | no |
168169
| enable\_kubernetes\_alpha | Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days. | `bool` | `false` | no |

modules/beta-public-cluster/cluster.tf

+8
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,14 @@ resource "google_container_cluster" "primary" {
447447
topic = var.notification_config_topic
448448
}
449449
}
450+
451+
node_pool_defaults {
452+
node_config_defaults {
453+
gcfs_config {
454+
enabled = var.enable_gcfs
455+
}
456+
}
457+
}
450458
}
451459
/******************************************
452460
Create Container Cluster node pools

modules/beta-public-cluster/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -727,3 +727,9 @@ variable "enable_identity_service" {
727727
description = "Enable the Identity Service component, which allows customers to use external identity providers with the K8S API."
728728
default = false
729729
}
730+
731+
variable "enable_gcfs" {
732+
type = bool
733+
description = "Enable image streaming on cluster level."
734+
default = false
735+
}

modules/safer-cluster-update-variant/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ For simplicity, we suggest using `roles/container.admin` and
218218
| disable\_default\_snat | Whether to disable the default SNAT to support the private use of public IP addresses | `bool` | `false` | no |
219219
| dns\_cache | (Beta) The status of the NodeLocal DNSCache addon. | `bool` | `false` | no |
220220
| enable\_cost\_allocation | Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery | `bool` | `false` | no |
221+
| enable\_gcfs | Enable image streaming on cluster level. | `bool` | `false` | no |
221222
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | `bool` | `false` | no |
222223
| enable\_mesh\_certificates | Controls the issuance of workload mTLS certificates. When enabled the GKE Workload Identity Certificates controller and node agent will be deployed in the cluster. Requires Workload Identity. | `bool` | `false` | no |
223224
| enable\_pod\_security\_policy | enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created. | `bool` | `false` | no |

modules/safer-cluster-update-variant/main.tf

+2
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,6 @@ module "gke" {
194194
notification_config_topic = var.notification_config_topic
195195

196196
timeouts = var.timeouts
197+
198+
enable_gcfs = var.enable_gcfs
197199
}

modules/safer-cluster-update-variant/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,12 @@ variable "timeouts" {
485485
}
486486
}
487487

488+
variable "enable_gcfs" {
489+
type = bool
490+
description = "Enable image streaming on cluster level."
491+
default = false
492+
}
493+
488494
variable "enable_mesh_certificates" {
489495
type = bool
490496
default = false

modules/safer-cluster/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ For simplicity, we suggest using `roles/container.admin` and
218218
| disable\_default\_snat | Whether to disable the default SNAT to support the private use of public IP addresses | `bool` | `false` | no |
219219
| dns\_cache | (Beta) The status of the NodeLocal DNSCache addon. | `bool` | `false` | no |
220220
| enable\_cost\_allocation | Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery | `bool` | `false` | no |
221+
| enable\_gcfs | Enable image streaming on cluster level. | `bool` | `false` | no |
221222
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | `bool` | `false` | no |
222223
| enable\_mesh\_certificates | Controls the issuance of workload mTLS certificates. When enabled the GKE Workload Identity Certificates controller and node agent will be deployed in the cluster. Requires Workload Identity. | `bool` | `false` | no |
223224
| enable\_pod\_security\_policy | enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created. | `bool` | `false` | no |

modules/safer-cluster/main.tf

+2
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,6 @@ module "gke" {
194194
notification_config_topic = var.notification_config_topic
195195

196196
timeouts = var.timeouts
197+
198+
enable_gcfs = var.enable_gcfs
197199
}

modules/safer-cluster/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,12 @@ variable "timeouts" {
485485
}
486486
}
487487

488+
variable "enable_gcfs" {
489+
type = bool
490+
description = "Enable image streaming on cluster level."
491+
default = false
492+
}
493+
488494
variable "enable_mesh_certificates" {
489495
type = bool
490496
default = false

0 commit comments

Comments
 (0)