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

Reconsider node pool configuration #8

Open
Sztigar opened this issue Aug 24, 2022 · 0 comments
Open

Reconsider node pool configuration #8

Sztigar opened this issue Aug 24, 2022 · 0 comments

Comments

@Sztigar
Copy link
Contributor

Sztigar commented Aug 24, 2022

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"
      }
    }
  ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant