Skip to content

Commit

Permalink
Add default kubelet config for node config for pools and clusters (#1234
Browse files Browse the repository at this point in the history
)

* Add default kubelet config for node config for pools and clusters

Needed by GCP now, setting to the default values.

Signed-off-by: Hayden Blauzvern <[email protected]>

* add missing cpu manager policy

Signed-off-by: Hayden Blauzvern <[email protected]>

---------

Signed-off-by: Hayden Blauzvern <[email protected]>
  • Loading branch information
haydentherapper authored Aug 21, 2024
1 parent 42ffcb5 commit c866ea2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions terraform/gcp/modules/gke_cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ resource "google_container_cluster" "cluster" {
tags = [local.cluster_network_tag]
service_account = google_service_account.gke-sa.email
oauth_scopes = var.oauth_scopes
kubelet_config {
cpu_cfs_quota = false
pod_pids_limit = 0
cpu_manager_policy = "none"
}
}

resource_labels = {
Expand Down
6 changes: 6 additions & 0 deletions terraform/gcp/modules/gke_cluster/node_pool.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ resource "google_container_node_pool" "cluster_nodes" {
service_account = google_service_account.gke-sa.email
oauth_scopes = ["https://www.googleapis.com/auth/cloud-platform"]

kubelet_config {
cpu_cfs_quota = false
pod_pids_limit = 0
cpu_manager_policy = "none"
}

// Protect node metadata and enable Workload Identity
// for this node pool. "SECURE" just protects the metadata.
// "EXPOSE" or not set allows for cluster takeover.
Expand Down

0 comments on commit c866ea2

Please sign in to comment.