terraform-google-modules / terraform-google-kubernetes-engine

Configures opinionated GKE clusters
https://registry.terraform.io/modules/terraform-google-modules/kubernetes-engine/google
Apache License 2.0
1.13k stars 1.16k forks source link

Make service range optional #1949

Open TheKangaroo opened 4 months ago

TheKangaroo commented 4 months ago

TL;DR

There is a new default service IP range which should be used for new 1.29.3+ clusters:

GKE versions up to 1.29.2 will create a random /20 range from 10.0.0.0/8 if ip_range_services is omitted. From 1.29.3 this will set the new default service range 34.118.224.0/20 on each cluster. ( See https://cloud.google.com/kubernetes-engine/docs/release-notes#May_10_2024 )

Currently it is possible to use the new default service range by explicitly setting var.ip_range_services to null. This works for our use case, but I was wondering if you wanted this to be the default for the module in the future. I'm happy to provide a PR for this, but wanted to make sure it was something that was wanted.

Terraform Resources

# something like this:

 variable "ip_range_services" {
   type        = string
-  description = "The _name_ of the secondary subnet range to use for services"
+  description = "The _name_ of the secondary subnet range to use for services. Omit to use default range."
+  default     = null
 }

Detailed design

No response

Additional information

No response

0Delta commented 2 months ago

I agree with this change, but I feel it needs validation. I've created a PR for now, what do you think?

TheKangaroo commented 2 months ago

@0Delta I love your PR. Lets see what the maintainers think about it.

github-actions[bot] commented 5 days ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

TheKangaroo commented 4 days ago

@apeabody is this something you would consider improving in this module?

apeabody commented 3 days ago

change: ip_range_services to optional value (#1949) #1989

Hi @TheKangaroo - Yes, looks like https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/1989 is currently waiting on the addition of test coverage. However additional PRs are welcomed.