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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubernetes_node_taint: don't fail if node is missing #2099

Merged
merged 2 commits into from
May 24, 2023

Conversation

partcyborg
Copy link
Contributor

@partcyborg partcyborg commented May 12, 2023

Description

Show a warning instead of an error if a tainted node is missing. Otherwise taints for deleted nodes can only be removed via terraform state rm.

Closes #2100

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestTestAccKubernetesResourceNodeTaint'
==> Checking that code complies with gofmt requirements...
go vet .
TF_ACC=1 go test "/home/mwilder/src/go/src/github.com/partcyborg/terraform-provider-kubernetes/kubernetes" -v -run=TestAccKubernetesResourceNodeTaint -timeout 3h
=== RUN   TestAccKubernetesResourceNodeTaint_basic
--- PASS: TestAccKubernetesResourceNodeTaint_basic (15.58s)
=== RUN   TestAccKubernetesResourceNodeTaint_MultipleBasic
--- PASS: TestAccKubernetesResourceNodeTaint_MultipleBasic (37.00s)
PASS
ok  	github.com/hashicorp/terraform-provider-kubernetes/kubernetes	52.599s

Release Note

Release note for CHANGELOG:

`resource/kubernetes_node_taint`: Don't fail when there is a taint in the state file for a node that no longer exists.

References

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Show a warning instead of an error if a tainted node is missing.
Otherwise taints for deleted nodes can only be removed via `terraform state rm`.
@partcyborg partcyborg requested a review from a team as a code owner May 12, 2023 01:36
@jrhouston
Copy link
Contributor

Thanks for fixing this @partcyborg 鉂わ笍

@jrhouston jrhouston merged commit 80e8520 into hashicorp:main May 24, 2023
13 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubernetes_node_taint: can't apply once tainted node is deleted
2 participants