Skip to content

Reconsider node pool configuration #8

@Sztigar

Description

@Sztigar

Right now if we want to label or add additional oauth scopes to node pool we need to do this by specifying maps additional_node_pool_oauth_scopes and node_pools_labels with map key referencing node pool name:

  node_pools = [
    {
      name         = "default-pool"
      disk_size_gb = 50
      max_count    = 3
      preemptible  = true
    }
  ]

  additional_node_pool_oauth_scopes = 
  {
    default-pool = [
      "https://www.googleapis.com/auth/cloud-platform",
      "https://www.googleapis.com/auth/logging.write",
      "https://www.googleapis.com/auth/monitoring"]
  }

  node_pools_labels = 
  {
    default-pool = {
      "node.pool/name" = "default-pool"
    }
  }

This type of referencing can be confusing and prone to typos leading to hard debugging. We should consider changing module to allow labels and oauth scopes to be specified inside node_pools variable like this:

  node_pools = [
    {
      name         = "default-pool"
      disk_size_gb = 50
      max_count    = 3
      preemptible  = true
      additional_node_pool_oauth_scopes = [
        "https://www.googleapis.com/auth/cloud-platform",
        "https://www.googleapis.com/auth/logging.write",
        "https://www.googleapis.com/auth/monitoring"
      ]
      node_pool_labels = { 
        "node.pool/name" = "default-pool"
      }
    }
  ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions