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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed GitHub Issue #1445 | location_policy permadrifting #1448

Closed
wants to merge 10 commits into from

Conversation

QBYMKPI
Copy link

@QBYMKPI QBYMKPI commented Nov 2, 2022

Hello devs,

we had the issue too with the GKE Module.
This is a workaround for the issue above.

Thank you.

@QBYMKPI QBYMKPI requested review from a team, Jberlinsky and bharathkkb as code owners November 2, 2022 12:57
@google-cla
Copy link

google-cla bot commented Nov 2, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Member

@bharathkkb bharathkkb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @QBYMKPI

cluster.tf Outdated
@@ -324,8 +324,9 @@ resource "google_container_node_pool" "pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = "BALANCED"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make the change in https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/tree/master/autogen and run make build. It would also be good to expose as an option to make it user configurable.

@bogaertg
Copy link
Contributor

bogaertg commented Nov 3, 2022

need this fix too 👍

autogen/main/cluster.tf.tmpl Outdated Show resolved Hide resolved
@QBYMKPI
Copy link
Author

QBYMKPI commented Nov 3, 2022

The cla is not working for me and I don't know why the terraform-google-kubernetes-engine-int-trigger is not working.

@nvanheuverzwijn
Copy link

I'm not sure but I think the location_policy is ANY when it's a spot instance and BALANCED otherwise :

location_policy = lookup(autoscaling.value, "location_policy", (lookup(autoscaling.value, "spot", false) || lookup(autoscaling.value, "preemptible", false) ? "ANY" : "BALANCED"))

Copy link
Member

@bharathkkb bharathkkb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@QBYMKPI CLA seems to be complaining about [email protected] as an email in one of commits which does not seem to have a CLA. You can also just rewrite and force push.

@nvanheuverzwijn also seems to be correct, looking at https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms#default_policy we should set default to ANY if spot is selected.

@comment-bot-dev
Copy link

@QBYMKPI
Thanks for the PR! 🚀
✅ Lint checks have passed.

@QBYMKPI
Copy link
Author

QBYMKPI commented Nov 4, 2022

Is someone with a valid CLA able to make this PR correctly? My setup won't allow me it.

@bogaertg
Copy link
Contributor

bogaertg commented Nov 4, 2022

Is someone with a valid CLA able to make this PR correctly? My setup won't allow me it.

done here #1452

@bharathkkb
Copy link
Member

fixed by #1452

@bharathkkb bharathkkb closed this Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants