Skip to content

Commit

Permalink
logging and monitoring config changes (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbensky authored Feb 12, 2024
1 parent debfc3d commit 8fccc60
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
17 changes: 11 additions & 6 deletions vpc-native-beta/inputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
Expand Down Expand Up @@ -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" {
Expand Down
11 changes: 9 additions & 2 deletions vpc-native-beta/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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
}
Expand Down

0 comments on commit 8fccc60

Please sign in to comment.