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

Add option to ignore changes to node pool size #763

Open
scott4589 opened this issue Jul 5, 2023 · 3 comments
Open

Add option to ignore changes to node pool size #763

scott4589 opened this issue Jul 5, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@scott4589
Copy link

scott4589 commented Jul 5, 2023

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

The oci_containerengine_node_pool resource currently has the ignore_changes lifecycle rule applied on various attributes but this does not include node_config_details.size.

This presents an issue when using the cluster autoscaler because it results in Terraform trying to revert the node count in the pool to the value specified by this variable. This behaviour may not be desired if the autoscaler has scaled up/down since the last Terraform apply operation and you want the nodes currently in place to remain unaffected following future apply operations.

The documentation suggests adding the ignore_changes lifecycle rule for the node_config_details.size field, so it would be very useful to have this provided as an option here.

New or Affected Resource(s)

oci_containerengine_node_pool

@scott4589 scott4589 added the enhancement New feature or request label Jul 5, 2023
@devoncrouse
Copy link
Member

Hi @scott4589, this is currently intentional, though I agree with the problem generally - it relates to hashicorp/terraform#24188 for ignoring fields dynamically. Without this, the size can never be changed through the module which can be a severe limitation the other way, when the autoscaler may not even be in use.

@shb-mll
Copy link

shb-mll commented Jul 28, 2023

@devoncrouse what is the recommendation in this case - where I have k8s cluster autoscaler enabled and I want to avoid changing the node pool size with subsequent terraform apply?

@12345ieee
Copy link
Contributor

I have the opposite usecase to you that @devoncrouse mentions.

In version 5.x, which has support for the autoscale at the nodepool definition level, this module could create a different nodepool object for autoscaler=true/false with two different ignore lists.

Clearly what we all need is a dynamic terraform lifecycle I hope hashicorp/terraform#24188 gets done soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants