ionos-cloud / terraform-provider-ionoscloud

The IonosCloud Terraform provider gives the ability to deploy and configure resources using the IonosCloud APIs.
Mozilla Public License 2.0
34 stars 23 forks source link

ionoscloud_dataplatform_node_pool labels not working #498

Closed juliakroeberbtg closed 6 months ago

juliakroeberbtg commented 9 months ago

Description

I have created the IONOS Cloud Dataplatform nodepool with the resource "ionoscloud_dataplatform_node_pool" and would like to label the nodes within the nodepool in order to use nodeselectors for certain applications. The labels have been set according to the documentation, however none of the created nodes have been labelled at all.

resource "ionoscloud_dataplatform_node_pool" "main" {
  for_each = { for node_config in var.node_pool_configs : node_config.np_name => node_config }

  cluster_id        = var.cluster_id
  name              = each.value.np_name
  node_count        = each.value.node_count
  cpu_family        = var.cpu_family
  cores_count       = each.value.cores_count
  ram_size          = each.value.ram_size
  availability_zone = var.availability_zone
  storage_type      = each.value.storage_type
  storage_size      = each.value.storage_size

  maintenance_window {
    day_of_the_week = "Monday"
    time            = "09:00:00"
  }

  labels = {
    environment = var.environment
    application = var.application
    node_pool   = each.value.np_name
    node_type   = "worker_node"
  }

  annotations = {
    environment = var.environment
    application = var.application
  }
}

Expected behavior

Nodes are labelled with the set labels

Environment

Terraform version:

1.6.3

Provider version:

6.4.9

OS:

linux
cristiGuranIonos commented 9 months ago

Hi, how are you checking that there are labels assigned? Are you using the k8s manager in the dcd?

cristiGuranIonos commented 9 months ago

The labels are internally stored by dataplatform, so you cannot see them in the k8s manager. This means that can see them only if you do a get on https://api.ionos.com/dataplatform/clusters//nodepools/ . Support on DCD will be added so you can see the dataplatform cluster separately as a dataplatform entity.

cristiGuranIonos commented 6 months ago

Please re-open if there is anything else needed.