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
33 stars 21 forks source link

Support Taints on ionoscloud_k8s_node_pool #225

Open djjudas21 opened 2 years ago

djjudas21 commented 2 years ago

Current Provider Version

[jgazeley@hephaestos cr-terraform]$ terraform version
Terraform v1.1.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/kubernetes v2.8.0
+ provider registry.terraform.io/hashicorp/vault v3.3.1
+ provider registry.terraform.io/ionos-cloud/ionoscloud v6.1.6

Use-cases

I have created a ionoscloud_k8s_cluster with multiple ionoscloud_k8s_node_pool. I need to dedicate one node pool as an infrastructure node pool and this requires setting a taint on the node, as in the Openshift docs (also applicable to Kubernetes).

These Taints on the nodepools will then match Tolerations on the infrastructure pods (e.g. Ingress)

Attempted Solutions

I also considered setting Labels on the node pools but this then requires setting a NodeSelector on every workload pod, and is not a workable solution as it relies on every user of the cluster to remember to set a suitable NodeSelector.

resource "ionoscloud_k8s_node_pool" "infra" {
  ...
  labels = {
    "node-role.kubernetes.io/infra" = ""
  }
}

Proposal

The ionoscloud_k8s_node_pool resource should support setting taints on a node pool. For example, this syntax:

resource "ionoscloud_k8s_node_pool" "infra" {
  ...
  taints = {
    "node-role.kubernetes.io/infra" = "NoSchedule"
  }
}

would be used to represent this Taint on the underlying Kubernetes node pool object:

      taints: 
      - key: node-role.kubernetes.io/infra
        effect: NoSchedule
cristiGuranIonos commented 2 years ago

Thanks for raising this issue! We currently do not support this but it is on the roadmap. We will let you know once this is added.

salyh commented 1 month ago

Any progress after more than 2 years?

djjudas21 commented 1 month ago

I worked around the problem by leaving IONOS and using different cloud platform :wink:

cristiGuranIonos commented 1 month ago

We're sorry to hear that. We have asked for this feature, but due to a high number of products coming out, this feature did not get to production. It is scheduled to come out in the 4th quarter of the year. Thanks!