Skip to content

Commit 3cd930c

Browse files
authored
feat(safer-cluster): add support for observability_metrics and _relay (#2291)
1 parent fd72d37 commit 3cd930c

File tree

8 files changed

+52
-6
lines changed

8 files changed

+52
-6
lines changed

autogen/safer-cluster/main.tf.tmpl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ module "gke" {
107107
logging_service = var.logging_service
108108
monitoring_service = var.monitoring_service
109109

110-
monitoring_enable_managed_prometheus = var.monitoring_enable_managed_prometheus
111-
monitoring_enabled_components = var.monitoring_enabled_components
110+
monitoring_enable_managed_prometheus = var.monitoring_enable_managed_prometheus
111+
monitoring_enable_observability_metrics = var.monitoring_enable_observability_metrics
112+
monitoring_enable_observability_relay = var.monitoring_enable_observability_relay
113+
monitoring_enabled_components = var.monitoring_enabled_components
112114

113115
enable_confidential_nodes = var.enable_confidential_nodes
114116

autogen/safer-cluster/variables.tf.tmpl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,18 @@ variable "monitoring_enable_managed_prometheus" {
280280
default = false
281281
}
282282

283+
variable "monitoring_enable_observability_metrics" {
284+
type = bool
285+
description = "Whether or not the advanced datapath metrics are enabled."
286+
default = false
287+
}
288+
289+
variable "monitoring_enable_observability_relay" {
290+
type = bool
291+
description = "Whether or not the advanced datapath relay is enabled."
292+
default = false
293+
}
294+
283295
variable "monitoring_enabled_components" {
284296
type = list(string)
285297
description = "List of services to monitor: SYSTEM_COMPONENTS, WORKLOADS. Empty list is default GKE configuration."

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ For simplicity, we suggest using `roles/container.admin` and
252252
| 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 |
253253
| master\_ipv4\_cidr\_block | The IP range in CIDR notation to use for the hosted master network | `string` | `"10.0.0.0/28"` | no |
254254
| monitoring\_enable\_managed\_prometheus | (Beta) Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled. | `bool` | `false` | no |
255+
| monitoring\_enable\_observability\_metrics | Whether or not the advanced datapath metrics are enabled. | `bool` | `false` | no |
256+
| monitoring\_enable\_observability\_relay | Whether or not the advanced datapath relay is enabled. | `bool` | `false` | no |
255257
| monitoring\_enabled\_components | List of services to monitor: SYSTEM\_COMPONENTS, WORKLOADS. Empty list is default GKE configuration. | `list(string)` | `[]` | no |
256258
| 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 |
257259
| name | The name of the cluster | `string` | n/a | yes |

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ module "gke" {
103103
logging_service = var.logging_service
104104
monitoring_service = var.monitoring_service
105105

106-
monitoring_enable_managed_prometheus = var.monitoring_enable_managed_prometheus
107-
monitoring_enabled_components = var.monitoring_enabled_components
106+
monitoring_enable_managed_prometheus = var.monitoring_enable_managed_prometheus
107+
monitoring_enable_observability_metrics = var.monitoring_enable_observability_metrics
108+
monitoring_enable_observability_relay = var.monitoring_enable_observability_relay
109+
monitoring_enabled_components = var.monitoring_enabled_components
108110

109111
enable_confidential_nodes = var.enable_confidential_nodes
110112

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,18 @@ variable "monitoring_enable_managed_prometheus" {
280280
default = false
281281
}
282282

283+
variable "monitoring_enable_observability_metrics" {
284+
type = bool
285+
description = "Whether or not the advanced datapath metrics are enabled."
286+
default = false
287+
}
288+
289+
variable "monitoring_enable_observability_relay" {
290+
type = bool
291+
description = "Whether or not the advanced datapath relay is enabled."
292+
default = false
293+
}
294+
283295
variable "monitoring_enabled_components" {
284296
type = list(string)
285297
description = "List of services to monitor: SYSTEM_COMPONENTS, WORKLOADS. Empty list is default GKE configuration."

modules/safer-cluster/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ For simplicity, we suggest using `roles/container.admin` and
252252
| 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 |
253253
| master\_ipv4\_cidr\_block | The IP range in CIDR notation to use for the hosted master network | `string` | `"10.0.0.0/28"` | no |
254254
| monitoring\_enable\_managed\_prometheus | (Beta) Configuration for Managed Service for Prometheus. Whether or not the managed collection is enabled. | `bool` | `false` | no |
255+
| monitoring\_enable\_observability\_metrics | Whether or not the advanced datapath metrics are enabled. | `bool` | `false` | no |
256+
| monitoring\_enable\_observability\_relay | Whether or not the advanced datapath relay is enabled. | `bool` | `false` | no |
255257
| monitoring\_enabled\_components | List of services to monitor: SYSTEM\_COMPONENTS, WORKLOADS. Empty list is default GKE configuration. | `list(string)` | `[]` | no |
256258
| 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 |
257259
| name | The name of the cluster | `string` | n/a | yes |

modules/safer-cluster/main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ module "gke" {
103103
logging_service = var.logging_service
104104
monitoring_service = var.monitoring_service
105105

106-
monitoring_enable_managed_prometheus = var.monitoring_enable_managed_prometheus
107-
monitoring_enabled_components = var.monitoring_enabled_components
106+
monitoring_enable_managed_prometheus = var.monitoring_enable_managed_prometheus
107+
monitoring_enable_observability_metrics = var.monitoring_enable_observability_metrics
108+
monitoring_enable_observability_relay = var.monitoring_enable_observability_relay
109+
monitoring_enabled_components = var.monitoring_enabled_components
108110

109111
enable_confidential_nodes = var.enable_confidential_nodes
110112

modules/safer-cluster/variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,18 @@ variable "monitoring_enable_managed_prometheus" {
280280
default = false
281281
}
282282

283+
variable "monitoring_enable_observability_metrics" {
284+
type = bool
285+
description = "Whether or not the advanced datapath metrics are enabled."
286+
default = false
287+
}
288+
289+
variable "monitoring_enable_observability_relay" {
290+
type = bool
291+
description = "Whether or not the advanced datapath relay is enabled."
292+
default = false
293+
}
294+
283295
variable "monitoring_enabled_components" {
284296
type = list(string)
285297
description = "List of services to monitor: SYSTEM_COMPONENTS, WORKLOADS. Empty list is default GKE configuration."

0 commit comments

Comments
 (0)