Skip to content

Conversation

romancin
Copy link

This PR enables Default Compute Class support for Cluster Autoscaler.

@romancin romancin requested review from apeabody, ericyz and a team as code owners September 12, 2025 05:08
@romancin romancin marked this pull request as draft September 12, 2025 05:20
@romancin romancin marked this pull request as ready for review September 12, 2025 05:25
Copy link
Collaborator

@apeabody apeabody 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 contribution @romancin!

Please resolve the linter error:

╷
│ Error: Unsupported argument
│ 
│   on ../../modules/beta-private-cluster/cluster.tf line 179, in resource "google_container_cluster" "primary":
│  179:     default_compute_class_enabled = lookup(var.cluster_autoscaling, "enable_default_compute_class", false)
│ 
│ An argument named "default_compute_class_enabled" is not expected here.

@romancin
Copy link
Author

Thanks for the contribution @romancin!

Please resolve the linter error:

╷
│ Error: Unsupported argument
│ 
│   on ../../modules/beta-private-cluster/cluster.tf line 179, in resource "google_container_cluster" "primary":
│  179:     default_compute_class_enabled = lookup(var.cluster_autoscaling, "enable_default_compute_class", false)
│ 
│ An argument named "default_compute_class_enabled" is not expected here.

Which google provider version is the linter using? Because this argument is available only since v7.

@apeabody
Copy link
Collaborator

Thanks for the contribution @romancin!
Please resolve the linter error:

╷
│ Error: Unsupported argument
│ 
│   on ../../modules/beta-private-cluster/cluster.tf line 179, in resource "google_container_cluster" "primary":
│  179:     default_compute_class_enabled = lookup(var.cluster_autoscaling, "enable_default_compute_class", false)
│ 
│ An argument named "default_compute_class_enabled" is not expected here.

Which google provider version is the linter using? Because this argument is available only since v7.

Got it - It's not the linter per say, but all the relevant versions constraints in the Terraform code as the highest allowed is selected. In this case it's the most recent v6.x.

I recommend you start by bumping the relevant minimum versions in https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/blob/main/autogen/main/versions.tf.tmpl#L27, as that will more clearly illustrate the dependencies. I know at a minimum we are waiting on #2456 for some examples.

@apeabody
Copy link
Collaborator

Thanks for the contribution @romancin!

The code base is now TPGv7 compatible, and initial support was added in #2434. However this implementation might be preferable?

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.

3 participants