Skip to content

feat(google_gke): add insecure_kubelet_readonly_port_enabled - #486

Merged
bkochendorfer merged 3 commits into
mainfrom
feat/gke-disable-kubelet-readonly-port
Aug 11, 2026
Merged

feat(google_gke): add insecure_kubelet_readonly_port_enabled#486
bkochendorfer merged 3 commits into
mainfrom
feat/gke-disable-kubelet-readonly-port

Conversation

@bkochendorfer

Copy link
Copy Markdown
Member

Adds insecure_kubelet_readonly_port_enabled (bool, default false) to the google_gke module, wiring it into both:

  • google_container_cluster.primary.node_pool_defaults.node_config_defaults — the default for node pools created after this is applied
  • google_container_node_pool.pools.node_config.kubelet_config — every pool the module manages

Both are needed: GKE does not retrofit the cluster-level default onto existing node pools.

The node_pool_defaults block is no longer conditional on enable_gcfs/enable_high_throughput_logging, since the read-only port setting always needs to be present. gcfs_config moved to a dynamic block so behavior is unchanged when enable_gcfs = false.

Behavior change for consumers

The default is false, so bumping to this version disables port 10255 on all node pools. Consumers should stage the rollout per cluster/region rather than applying fleet-wide in one go, and can set insecure_kubelet_readonly_port_enabled = true to defer.

Context

Unblocks MZCLD-1982, which has been on hold since Sept 2024 waiting for provider support. The provider fields landed in google/google-beta 6.x; the module already pins >= 6.0, < 8.0, so no provider bump is required.

Ref: https://cloud.google.com/kubernetes-engine/docs/how-to/disable-kubelet-readonly-port

Testing

tofu fmt -check and tofu validate clean. No apply run yet — first apply will be against sandbox-high-nonprod.

Exposes the kubelet read-only port (10255) setting on both the cluster
node defaults and each node pool, defaulting to disabled.
@bkochendorfer
bkochendorfer requested review from a team, ahoneiser and mikaeld as code owners August 5, 2026 19:47
@github-actions github-actions Bot added the minor This PR will increment a minor version label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Release plan

Directory Previous version New version
google_gke 0.13.0 0.14.0

jbuck
jbuck previously approved these changes Aug 5, 2026
Comment thread google_gke/cluster.tf Outdated
# Defaults for new node pools only; existing pools are set per pool below.
node_pool_defaults {
node_config_defaults {
insecure_kubelet_readonly_port_enabled = var.insecure_kubelet_readonly_port_enabled ? "TRUE" : "FALSE"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we should make this configurable.

chore(docs): google_gke/README.md
@bkochendorfer
bkochendorfer force-pushed the feat/gke-disable-kubelet-readonly-port branch from 2e6e6f0 to 1fe03cc Compare August 11, 2026 19:18
@bkochendorfer
bkochendorfer merged commit f30a631 into main Aug 11, 2026
10 checks passed
@bkochendorfer
bkochendorfer deleted the feat/gke-disable-kubelet-readonly-port branch August 11, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor This PR will increment a minor version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants