Skip to content

Commit dafdd72

Browse files
authored
fix!: update relay_mode to enable_relay (#2067)
1 parent e11787c commit dafdd72

File tree

24 files changed

+61
-79
lines changed

24 files changed

+61
-79
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ Then perform the following commands on the root folder:
204204
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
205205
| monitoring\_enable\_managed\_prometheus | Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled. | `bool` | `false` | no |
206206
| monitoring\_enable\_observability\_metrics | Whether or not the advanced datapath metrics are enabled. | `bool` | `false` | no |
207+
| monitoring\_enable\_observability\_relay | Whether or not the advanced datapath relay is enabled. | `bool` | `false` | no |
207208
| monitoring\_enabled\_components | List of services to monitor: SYSTEM\_COMPONENTS, APISERVER, SCHEDULER, CONTROLLER\_MANAGER, STORAGE, HPA, POD, DAEMONSET, DEPLOYMENT, STATEFULSET, KUBELET, CADVISOR and DCGM. In beta provider, WORKLOADS is supported on top of those 12 values. (WORKLOADS is deprecated and removed in GKE 1.24.) KUBELET and CADVISOR are only supported in GKE 1.29.3-gke.1093000 and above. Empty list is default GKE configuration. | `list(string)` | `[]` | no |
208-
| monitoring\_observability\_metrics\_relay\_mode | Mode used to make advanced datapath metrics relay available. | `string` | `null` | no |
209209
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | `string` | `"monitoring.googleapis.com/kubernetes"` | no |
210210
| name | The name of the cluster (required) | `string` | n/a | yes |
211211
| network | The VPC network to host the cluster in (required) | `string` | n/a | yes |

autogen/main/cluster.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ resource "google_container_cluster" "primary" {
126126
}
127127
advanced_datapath_observability_config {
128128
enable_metrics = var.monitoring_enable_observability_metrics
129-
relay_mode = var.monitoring_observability_metrics_relay_mode
129+
enable_relay = var.monitoring_enable_observability_relay
130130
}
131131
}
132132
}

autogen/main/variables.tf.tmpl

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -851,14 +851,10 @@ variable "monitoring_enable_observability_metrics" {
851851
default = false
852852
}
853853

854-
variable "monitoring_observability_metrics_relay_mode" {
855-
type = string
856-
description = "Mode used to make advanced datapath metrics relay available."
857-
default = null
858-
validation {
859-
condition = var.monitoring_observability_metrics_relay_mode == null ? true : contains(["DISABLED", "INTERNAL_VPC_LB", "EXTERNAL_LB"], var.monitoring_observability_metrics_relay_mode)
860-
error_message = "The advanced datapath metrics relay value must be one of DISABLED, INTERNAL_VPC_LB, EXTERNAL_LB."
861-
}
854+
variable "monitoring_enable_observability_relay" {
855+
type = bool
856+
description = "Whether or not the advanced datapath relay is enabled."
857+
default = false
862858
}
863859

864860
variable "monitoring_enabled_components" {

cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ resource "google_container_cluster" "primary" {
9999
}
100100
advanced_datapath_observability_config {
101101
enable_metrics = var.monitoring_enable_observability_metrics
102-
relay_mode = var.monitoring_observability_metrics_relay_mode
102+
enable_relay = var.monitoring_enable_observability_relay
103103
}
104104
}
105105
}

docs/upgrading_to_v33.0.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,17 @@ To opt out, set `enable_private_nodes` to `false`.
1313
+ enable_private_nodes = false
1414
}
1515
```
16+
17+
### Advanced Datapath Observability Relay
18+
The `monitoring_observability_metrics_relay_mode` parameter has been
19+
replaced with `monitoring_enable_observability_relay`.
20+
21+
```diff
22+
module "cluster" {
23+
- version = "~> 32.0"
24+
+ version = "~> 33.0"
25+
26+
- monitoring_observability_metrics_relay_mode = "INTERNAL_VPC_LB"
27+
+ monitoring_enable_observability_relay = true
28+
}
29+
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@ Then perform the following commands on the root folder:
252252
| master\_ipv4\_cidr\_block | The IP range in CIDR notation to use for the hosted master network. Optional for Autopilot clusters. | `string` | `"10.0.0.0/28"` | no |
253253
| monitoring\_enable\_managed\_prometheus | Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled. | `bool` | `false` | no |
254254
| monitoring\_enable\_observability\_metrics | Whether or not the advanced datapath metrics are enabled. | `bool` | `false` | no |
255+
| monitoring\_enable\_observability\_relay | Whether or not the advanced datapath relay is enabled. | `bool` | `false` | no |
255256
| monitoring\_enabled\_components | List of services to monitor: SYSTEM\_COMPONENTS, APISERVER, SCHEDULER, CONTROLLER\_MANAGER, STORAGE, HPA, POD, DAEMONSET, DEPLOYMENT, STATEFULSET, KUBELET, CADVISOR and DCGM. In beta provider, WORKLOADS is supported on top of those 12 values. (WORKLOADS is deprecated and removed in GKE 1.24.) KUBELET and CADVISOR are only supported in GKE 1.29.3-gke.1093000 and above. Empty list is default GKE configuration. | `list(string)` | `[]` | no |
256-
| monitoring\_observability\_metrics\_relay\_mode | Mode used to make advanced datapath metrics relay available. | `string` | `null` | no |
257257
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | `string` | `"monitoring.googleapis.com/kubernetes"` | no |
258258
| name | The name of the cluster (required) | `string` | n/a | yes |
259259
| network | The VPC network to host the cluster in (required) | `string` | n/a | yes |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ resource "google_container_cluster" "primary" {
105105
}
106106
advanced_datapath_observability_config {
107107
enable_metrics = var.monitoring_enable_observability_metrics
108-
relay_mode = var.monitoring_observability_metrics_relay_mode
108+
enable_relay = var.monitoring_enable_observability_relay
109109
}
110110
}
111111
}

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -812,14 +812,10 @@ variable "monitoring_enable_observability_metrics" {
812812
default = false
813813
}
814814

815-
variable "monitoring_observability_metrics_relay_mode" {
816-
type = string
817-
description = "Mode used to make advanced datapath metrics relay available."
818-
default = null
819-
validation {
820-
condition = var.monitoring_observability_metrics_relay_mode == null ? true : contains(["DISABLED", "INTERNAL_VPC_LB", "EXTERNAL_LB"], var.monitoring_observability_metrics_relay_mode)
821-
error_message = "The advanced datapath metrics relay value must be one of DISABLED, INTERNAL_VPC_LB, EXTERNAL_LB."
822-
}
815+
variable "monitoring_enable_observability_relay" {
816+
type = bool
817+
description = "Whether or not the advanced datapath relay is enabled."
818+
default = false
823819
}
824820

825821
variable "monitoring_enabled_components" {

modules/beta-private-cluster/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ Then perform the following commands on the root folder:
230230
| master\_ipv4\_cidr\_block | The IP range in CIDR notation to use for the hosted master network. Optional for Autopilot clusters. | `string` | `"10.0.0.0/28"` | no |
231231
| monitoring\_enable\_managed\_prometheus | Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled. | `bool` | `false` | no |
232232
| monitoring\_enable\_observability\_metrics | Whether or not the advanced datapath metrics are enabled. | `bool` | `false` | no |
233+
| monitoring\_enable\_observability\_relay | Whether or not the advanced datapath relay is enabled. | `bool` | `false` | no |
233234
| monitoring\_enabled\_components | List of services to monitor: SYSTEM\_COMPONENTS, APISERVER, SCHEDULER, CONTROLLER\_MANAGER, STORAGE, HPA, POD, DAEMONSET, DEPLOYMENT, STATEFULSET, KUBELET, CADVISOR and DCGM. In beta provider, WORKLOADS is supported on top of those 12 values. (WORKLOADS is deprecated and removed in GKE 1.24.) KUBELET and CADVISOR are only supported in GKE 1.29.3-gke.1093000 and above. Empty list is default GKE configuration. | `list(string)` | `[]` | no |
234-
| monitoring\_observability\_metrics\_relay\_mode | Mode used to make advanced datapath metrics relay available. | `string` | `null` | no |
235235
| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | `string` | `"monitoring.googleapis.com/kubernetes"` | no |
236236
| name | The name of the cluster (required) | `string` | n/a | yes |
237237
| network | The VPC network to host the cluster in (required) | `string` | n/a | yes |

modules/beta-private-cluster/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ resource "google_container_cluster" "primary" {
105105
}
106106
advanced_datapath_observability_config {
107107
enable_metrics = var.monitoring_enable_observability_metrics
108-
relay_mode = var.monitoring_observability_metrics_relay_mode
108+
enable_relay = var.monitoring_enable_observability_relay
109109
}
110110
}
111111
}

0 commit comments

Comments
 (0)