Skip to content

[RFE] The ability to deactivate "override pod termination grace periods" #1607

@karimarous

Description

@karimarous

Is your feature request related to a problem? Please describe.

Terraform Rancher2 provider version used: 7.3.2
I added this block to my terraform code which designed to create an RKE2 cluster.

resource "rancher2_cluster_v2" "rke2" {
  name        = "test"
  kubernetes_version = var.kubernetes_version
  rke_config {
    upgrade_strategy {
     .
     .
     .
      worker_drain_options {
        enabled = true
        force = false
        ignore_daemon_sets    = true
        delete_empty_dir_data = true 
        ignore_errors = false
        grace_period = -1
        timeout = 120
        disable_eviction = false
      }
    }
  }
}

When i tested the code, I saw that the option override pod termination grace periods was still activated
Image

Describe the solution you'd like

I want to add the possibility to desactivate "overide pod termination grace periods"

So the code will be something like this

resource "rancher2_cluster_v2" "rke2" {
  name        = "test"
  kubernetes_version = var.kubernetes_version
  rke_config {
    upgrade_strategy {
     .
     .
     .
      worker_drain_options {
        enabled = true
        force = false
        ignore_daemon_sets    = true
        delete_empty_dir_data = true 
        ignore_errors = false
        override_pod_termination_grace_periods = false
        grace_period = -1 # this attribute only required if override_pod_termination_grace_periods = true
        timeout = 120
        disable_eviction = false
      }
    }
  }
}

Describe alternatives you've considered

How you can implement the solution doesn't matter, the more important is the ability to activate and decativate the option

Thanks for the effort in advance

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions