Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Add cpu_manager_policy to workers #1406

Merged
merged 3 commits into from
Sep 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ storage:
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
cgroupDriver: "$${docker_cgroup_driver}"
%{~ if cpu_manager_policy == "static" ~}
cpuManagerPolicy: ${cpu_manager_policy}
systemReserved:
cpu: ${system_reserved_cpu}
kubeReserved:
cpu: ${kube_reserved_cpu}
%{~ endif ~}
EOF
- path: /etc/kubernetes/delete-node
filesystem: root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,21 @@ variable "enable_csi" {
type = bool
default = false
}

variable "cpu_manager_policy" {
description = "CPU Manager policy to use for the worker pool. Possible values: `none`, `static`."
default = "none"
type = string
}

variable "kube_reserved_cpu" {
description = "CPU cores reserved for the Worker Kubernetes components like kubelet, etc."
default = "300m"
type = string
}

variable "system_reserved_cpu" {
description = "CPU cores reserved for the host services like Docker, sshd, kernel, etc."
default = "500m"
type = string
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ data "ct_config" "worker-ignition" {
node_labels = merge({ "node.kubernetes.io/node" = "" }, var.labels)
taints = var.taints
enable_tls_bootstrap = var.enable_tls_bootstrap
cpu_manager_policy = var.cpu_manager_policy
system_reserved_cpu = var.system_reserved_cpu
kube_reserved_cpu = var.kube_reserved_cpu

})
pretty_print = false
snippets = var.clc_snippets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,13 @@ storage:
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
cgroupDriver: "$${docker_cgroup_driver}"
%{~ if cpu_manager_policy == "static" ~}
cpuManagerPolicy: ${cpu_manager_policy}
systemReserved:
cpu: ${system_reserved_cpu}
kubeReserved:
cpu: ${kube_reserved_cpu}
%{~ endif ~}
EOF
- path: /opt/wait-for-dns
filesystem: root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,21 @@ variable "enable_tls_bootstrap" {
description = "Enable TLS Bootstrap for Kubelet."
type = bool
}

variable "cpu_manager_policy" {
description = "CPU Manager policy to use for the worker pool. Possible values: `none`, `static`."
default = "none"
type = string
}

variable "kube_reserved_cpu" {
description = "CPU cores reserved for the Worker Kubernetes components like kubelet, etc."
default = "300m"
type = string
}

variable "system_reserved_cpu" {
description = "CPU cores reserved for the host services like Docker, sshd, kernel, etc."
default = "500m"
type = string
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ data "ct_config" "ignitions" {
cluster_name = var.cluster_name
dns_zone = var.dns_zone
enable_tls_bootstrap = var.enable_tls_bootstrap
cpu_manager_policy = var.cpu_manager_policy
system_reserved_cpu = var.system_reserved_cpu
kube_reserved_cpu = var.kube_reserved_cpu
}
)
platform = "packet"
Expand Down
107 changes: 54 additions & 53 deletions docs/configuration-reference/platforms/aws.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/configuration-reference/platforms/equinix-metal.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ node_type = var.custom_default_worker_type
| `worker_pool.count` | Number of workers in the worker pool. Can be changed afterwards to add or delete workers. | 1 | number | true |
| `worker_pool.clc_snippets` | Flatcar Container Linux Config snippets for nodes in the worker pool. | [] | list(string) | false |
| `worker_pool.tags` | List of tags that will be propagated to nodes in the worker pool. | - | map(string) | false |
| `worker_pool.cpu_manager_policy` | CPU Manager policy to use. Possible values: `none`, `static`. | "none" | string | false |
| `worker_pool.disable_bgp` | Disable BGP on nodes. Nodes won't be able to connect to Equinix Metal BGP peers. | false | bool | false |
| `worker_pool.ipxe_script_url` | Boot via iPXE. Required for arm64. | - | string | false |
| `worker_pool.os_arch` | Flatcar Container Linux architecture to install (amd64, arm64). | "amd64" | string | false |
Expand Down
Loading