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

gcp: Tag nodes with their purpose for costing purposes #3397

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions terraform/gcp/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ resource "google_container_node_pool" "core" {
# Faster disks provide faster image pulls!
disk_type = "pd-balanced"

resource_labels = {
"node-purpose" : "core"
}

labels = {
"hub.jupyter.org/node-purpose" = "core",
"k8s.dask.org/node-purpose" = "core"
Expand Down Expand Up @@ -336,7 +340,9 @@ resource "google_container_node_pool" "notebook" {
"https://www.googleapis.com/auth/cloud-platform"
]

resource_labels = each.value.resource_labels
resource_labels = merge({
"node-purpose" : "notebook"
}, each.value.resource_labels)

// Set these values explicitly so they don't "change outside terraform"
tags = []
Expand Down Expand Up @@ -416,7 +422,9 @@ resource "google_container_node_pool" "dask_worker" {
"https://www.googleapis.com/auth/cloud-platform"
]

resource_labels = each.value.resource_labels
resource_labels = merge({
"node-purpose" : "dask-worker"
}, each.value.resource_labels)

// Set these values explicitly so they don't "change outside terraform"
tags = []
Expand Down