diff --git a/vpc-native-beta/inputs.tf b/vpc-native-beta/inputs.tf index c2cbf32..f95d416 100644 --- a/vpc-native-beta/inputs.tf +++ b/vpc-native-beta/inputs.tf @@ -27,6 +27,11 @@ variable "pods_secondary_ip_range_name" { description = "The name of an existing network secondary IP range to be used for pods." } +variable "release_channel" { + description = "The release channel for the Kubernetes version." + default = "UNSPECIFIED" +} + variable "services_secondary_ip_range_name" { description = "The name of an existing network secondary IP range to be used for services." } @@ -64,14 +69,14 @@ variable "master_ipv4_cidr_block" { default = null } -variable "monitoring_service" { - description = "The monitoring service to write metrics to" - default = "monitoring.googleapis.com/kubernetes" +variable "monitoring_config" { + description = "Exposes metrics cluster components." + default = [ "SYSTEM_COMPONENTS" ] } -variable "logging_service" { - description = "The logging service to write logs to" - default = "logging.googleapis.com/kubernetes" +variable "logging_config" { + description = "Exposes logs for cluster components." + default = [ "SYSTEM_COMPONENTS" ] } variable "vpa_enabled" { diff --git a/vpc-native-beta/main.tf b/vpc-native-beta/main.tf index 522486b..a658f10 100644 --- a/vpc-native-beta/main.tf +++ b/vpc-native-beta/main.tf @@ -11,8 +11,6 @@ resource "google_container_cluster" "cluster" { min_master_version = var.kubernetes_version network = var.network_name subnetwork = var.nodes_subnetwork_name - monitoring_service = var.monitoring_service - logging_service = var.logging_service enable_shielded_nodes = var.enable_shielded_nodes @@ -35,7 +33,16 @@ resource "google_container_cluster" "cluster" { issue_client_certificate = false } } + + release_channel { + channel = var.release_channel + } + + logging_config { + enable_components = var.logging_config + } monitoring_config { + enable_components = var.monitoring_config managed_prometheus { enabled = var.enable_managed_prometheus }