Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No changes detected when adding observability_metrics inputs to existing cluster modules. #1892

Closed
Markieta opened this issue Mar 1, 2024 · 4 comments · May be fixed by #1894
Closed

No changes detected when adding observability_metrics inputs to existing cluster modules. #1892

Markieta opened this issue Mar 1, 2024 · 4 comments · May be fixed by #1894
Labels
bug Something isn't working Stale

Comments

@Markieta
Copy link

Markieta commented Mar 1, 2024

TL;DR

No changes are detected when adding monitoring_enable_observability_metrics and/or monitoring_observability_metrics_relay_mode to an existing private-cluster module to enable/disable Dataplane V2 Observability.

Expected behavior

Setting the following:

  monitoring_enable_observability_metrics = true
  monitoring_observability_metrics_relay_mode = "INTERNAL_VPC_LB"

should generate the advanced_datapath_observability_config for the target cluster.

And setting the following:

  monitoring_enable_observability_metrics = false

should disable it on an existing cluster (e.g., where this was previously enabled via CLI).

Observed behavior

No changes. Your infrastructure matches the configuration.

Terraform Configuration

module "gke" {
  source     = "terraform-google-modules/kubernetes-engine/google//modules/private-cluster"
  project_id = local.project_data.project_id
  name       = "${local.resource_prefix}-k8s"
  region     = local.region
  zones      = [local.zone]
  network    = module.gcp-network.network_name
  subnetwork = module.gcp-network.subnets["${local.region}/${local.resource_prefix}-primary"].name

  ip_range_services                 = module.gcp-network.subnets["${local.region}/${local.resource_prefix}-primary"].secondary_ip_range[0].range_name
  ip_range_pods                     = module.gcp-network.subnets["${local.region}/${local.resource_prefix}-primary"].secondary_ip_range[1].range_name
  remove_default_node_pool          = true
  create_service_account            = true
  grant_registry_access             = true
  enable_private_endpoint           = true
  enable_private_nodes              = true
  enable_vertical_pod_autoscaling   = true
  release_channel                   = "RAPID"
  network_policy                    = false
  datapath_provider                 = "ADVANCED_DATAPATH"
  add_master_webhook_firewall_rules = true
  gke_backup_agent_config           = true
  monitoring_enable_observability_metrics = true
  monitoring_observability_metrics_relay_mode = "INTERNAL_VPC_LB"


  master_authorized_networks = [
    {
      cidr_block   = "${local.network}",
      display_name = "main"
    }
  ]

  node_pools = [
    {
      name         = "main"
      machine_type = "e2-standard-2"
      min_count    = 1
      max_count    = 4
      spot         = true
    }
}

Terraform Version

Terraform v1.7.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/google v5.18.0
+ provider registry.terraform.io/hashicorp/google-beta v5.18.0
+ provider registry.terraform.io/hashicorp/kubernetes v2.26.0
+ provider registry.terraform.io/hashicorp/random v3.6.0

Additional information

No response

@TheKangaroo
Copy link
Contributor

As I commented in the PR, I think this works for me.
Just to be sure, could you pin the module version to make sure this isn't a caching issue.

module "gke" {
  source  = "terraform-google-modules/kubernetes-engine/google//modules/beta-private-cluster"
  version = "30.0.0"
...
}

@Markieta
Copy link
Author

Markieta commented Mar 4, 2024

Made a PR that identifies my issue.

@TheKangaroo
Copy link
Contributor

Ah I see. I don't use managed prometheus, so I missed the dependency here. Thanks for fixing this :)

Copy link

github-actions bot commented May 4, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Stale label May 4, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
2 participants