Skip to content

Commit

Permalink
fix(autopilot): option to configure gcfs
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody committed Aug 22, 2024
1 parent 8dfb209 commit adf5ff3
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 3 deletions.
2 changes: 0 additions & 2 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -672,11 +672,9 @@ resource "google_container_cluster" "primary" {
{% if autopilot_cluster %}
logging_variant = var.logging_variant
{% endif %}
{% if autopilot_cluster != true %}
gcfs_config {
enabled = var.enable_gcfs
}
{% endif %}
}
}
{% endif %}
Expand Down
7 changes: 6 additions & 1 deletion autogen/main/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -941,13 +941,18 @@ variable "sandbox_enabled" {
description = "(Beta) Enable GKE Sandbox (Do not forget to set `image_type` = `COS_CONTAINERD` to use it)."
default = false
}
{% endif %}

variable "enable_gcfs" {
type = bool
description = "(Beta) Enable image streaming on cluster level."
{% if autopilot_cluster != true %}
default = false
}
{% endif %}
{% if autopilot_cluster %}
default = null
{% endif %}
}
{% endif %}

{% if autopilot_cluster != true %}
Expand Down
1 change: 1 addition & 0 deletions modules/beta-autopilot-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Then perform the following commands on the root folder:
| enable\_confidential\_nodes | An optional flag to enable confidential node config. | `bool` | `false` | no |
| 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 |
| enable\_fqdn\_network\_policy | Enable FQDN Network Policies on the cluster | `bool` | `null` | no |
| enable\_gcfs | (Beta) Enable image streaming on cluster level. | `bool` | `null` | no |
| enable\_l4\_ilb\_subsetting | Enable L4 ILB Subsetting on the cluster | `bool` | `false` | no |
| enable\_network\_egress\_export | Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. | `bool` | `false` | no |
| enable\_private\_endpoint | Whether the master's internal IP address is used as the cluster endpoint | `bool` | `false` | no |
Expand Down
3 changes: 3 additions & 0 deletions modules/beta-autopilot-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,9 @@ resource "google_container_cluster" "primary" {
node_pool_defaults {
node_config_defaults {
logging_variant = var.logging_variant
gcfs_config {
enabled = var.enable_gcfs
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions modules/beta-autopilot-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,12 @@ variable "enable_l4_ilb_subsetting" {
default = false
}

variable "enable_gcfs" {
type = bool
description = "(Beta) Enable image streaming on cluster level."
default = null
}

variable "allow_net_admin" {
description = "(Optional) Enable NET_ADMIN for the cluster."
type = bool
Expand Down
1 change: 1 addition & 0 deletions modules/beta-autopilot-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Then perform the following commands on the root folder:
| enable\_confidential\_nodes | An optional flag to enable confidential node config. | `bool` | `false` | no |
| 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 |
| enable\_fqdn\_network\_policy | Enable FQDN Network Policies on the cluster | `bool` | `null` | no |
| enable\_gcfs | (Beta) Enable image streaming on cluster level. | `bool` | `null` | no |
| enable\_l4\_ilb\_subsetting | Enable L4 ILB Subsetting on the cluster | `bool` | `false` | no |
| enable\_network\_egress\_export | Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. | `bool` | `false` | no |
| enable\_resource\_consumption\_export | Whether to enable resource consumption metering on this cluster. When enabled, a table will be created in the resource export BigQuery dataset to store resource consumption data. The resulting table can be joined with the resource usage table or with BigQuery billing export. | `bool` | `true` | no |
Expand Down
3 changes: 3 additions & 0 deletions modules/beta-autopilot-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ resource "google_container_cluster" "primary" {
node_pool_defaults {
node_config_defaults {
logging_variant = var.logging_variant
gcfs_config {
enabled = var.enable_gcfs
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions modules/beta-autopilot-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,12 @@ variable "enable_l4_ilb_subsetting" {
default = false
}

variable "enable_gcfs" {
type = bool
description = "(Beta) Enable image streaming on cluster level."
default = null
}

variable "allow_net_admin" {
description = "(Optional) Enable NET_ADMIN for the cluster."
type = bool
Expand Down

0 comments on commit adf5ff3

Please sign in to comment.