Skip to content

Commit

Permalink
Enable usage of gcp filestore csi driver (GoogleCloudPlatform#5648)
Browse files Browse the repository at this point in the history
  • Loading branch information
grieshaber authored and lcaggio committed Mar 18, 2022
1 parent 6c06a50 commit 7409a92
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3053,6 +3053,14 @@ func expandClusterAddonsConfig(configured interface{}) *container.AddonsConfig {
ForceSendFields: []string{"Disabled"},
}
}

if v, ok := config["gcp_filestore_csi_driver_config"]; ok && len(v.([]interface{})) > 0 {
addon := v.([]interface{})[0].(map[string]interface{})
ac.GcpFilestoreCsiDriverConfig = &container.GcpFilestoreCsiDriverConfig{
Enabled: addon["enabled"].(bool),
ForceSendFields: []string{"Enabled"},
}
}

if v, ok := config["gcp_filestore_csi_driver_config"]; ok && len(v.([]interface{})) > 0 {
addon := v.([]interface{})[0].(map[string]interface{})
Expand Down Expand Up @@ -3711,6 +3719,14 @@ func flattenClusterAddonsConfig(c *container.AddonsConfig) []map[string]interfac
},
}
}

if c.GcpFilestoreCsiDriverConfig != nil {
result["gcp_filestore_csi_driver_config"] = []map[string]interface{}{
{
"enabled": c.GcpFilestoreCsiDriverConfig.Enabled,
},
}
}

if c.GcpFilestoreCsiDriverConfig != nil {
result["gcp_filestore_csi_driver_config"] = []map[string]interface{}{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ subnetwork in which the cluster's instances are launched.
It can only be disabled if the nodes already do not have network policies enabled.
Defaults to disabled; set `disabled = false` to enable.

* `gcp_filestore_csi_driver_config` - (Optional) The status of the Filestore CSI driver addon,
* `gcp_filestore_csi_driver_config` - (Optional) The status of the Filestore CSI driver addon,
which allows the usage of filestore instance as volumes.
It is disabled by default; set `enabled = true` to enable.
It is disbaled by default; set `enabled = true` to enable.

* `cloudrun_config` - (Optional). Structure is [documented below](#nested_cloudrun_config).

Expand Down

0 comments on commit 7409a92

Please sign in to comment.