Skip to content

Commit

Permalink
kubelet: add setting for configuring PodPidsLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
gthao313 committed May 17, 2022
1 parent e49fb60 commit c17682d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ The following settings are optional and allow you to further configure your clus
* `settings.kubernetes.cpu-manager-reconcile-period`: Specifies the CPU manager reconcile period, which controls how often updated CPU assignments are written to cgroupfs. The value is a duration like `30s` for 30 seconds or `1h5m` for 1 hour and 5 minutes.
* `settings.kubernetes.topology-manager-policy`: Specifies the topology manager policy. Possible values are `none`, `restricted`, `best-effort`, and `single-numa-node`. Defaults to `none`.
* `settings.kubernetes.topology-manager-scope`: Specifies the topology manager scope. Possible values are `container` and `pod`. Defaults to `container`. If you want to group all containers in a pod to a common set of NUMA nodes, you can set this setting to `pod`.
* `settings.kubernetes.pod-pids-limit`: The maximum number of processes per pod.
You can also optionally specify static pods for your node with the following settings.
Static pods can be particularly useful when running in standalone mode.
Expand Down
3 changes: 3 additions & 0 deletions packages/kubernetes-1.19/kubelet-config
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ topologyManagerScope: {{settings.kubernetes.topology-manager-scope}}
{{#if settings.kubernetes.topology-manager-policy}}
topologyManagerPolicy: {{settings.kubernetes.topology-manager-policy}}
{{/if}}
{{#if settings.kubernetes.pod-pids-limit includeZero=true}}
podPidsLimit: {{settings.kubernetes.pod-pids-limit}}
{{/if}}
resolvConf: "/etc/resolv.conf"
hairpinMode: hairpin-veth
readOnlyPort: 0
Expand Down
3 changes: 3 additions & 0 deletions packages/kubernetes-1.20/kubelet-config
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ topologyManagerScope: {{settings.kubernetes.topology-manager-scope}}
{{#if settings.kubernetes.topology-manager-policy}}
topologyManagerPolicy: {{settings.kubernetes.topology-manager-policy}}
{{/if}}
{{#if settings.kubernetes.pod-pids-limit includeZero=true}}
podPidsLimit: {{settings.kubernetes.pod-pids-limit}}
{{/if}}
resolvConf: "/etc/resolv.conf"
hairpinMode: hairpin-veth
readOnlyPort: 0
Expand Down
3 changes: 3 additions & 0 deletions packages/kubernetes-1.21/kubelet-config
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ topologyManagerScope: {{settings.kubernetes.topology-manager-scope}}
{{#if settings.kubernetes.topology-manager-policy}}
topologyManagerPolicy: {{settings.kubernetes.topology-manager-policy}}
{{/if}}
{{#if settings.kubernetes.pod-pids-limit includeZero=true}}
podPidsLimit: {{settings.kubernetes.pod-pids-limit}}
{{/if}}
resolvConf: "/etc/resolv.conf"
hairpinMode: hairpin-veth
readOnlyPort: 0
Expand Down
3 changes: 3 additions & 0 deletions packages/kubernetes-1.22/kubelet-config
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ topologyManagerScope: {{settings.kubernetes.topology-manager-scope}}
{{#if settings.kubernetes.topology-manager-policy}}
topologyManagerPolicy: {{settings.kubernetes.topology-manager-policy}}
{{/if}}
{{#if settings.kubernetes.pod-pids-limit includeZero=true}}
podPidsLimit: {{settings.kubernetes.pod-pids-limit}}
{{/if}}
resolvConf: "/etc/resolv.conf"
hairpinMode: hairpin-veth
readOnlyPort: 0
Expand Down
1 change: 1 addition & 0 deletions sources/models/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ struct KubernetesSettings {
cpu_manager_reconcile_period: KubernetesDurationValue,
topology_manager_scope: TopologyManagerScope,
topology_manager_policy: TopologyManagerPolicy,
pod_pids_limit: i64,

// Settings where we generate a value based on the runtime environment. The user can specify a
// value to override the generated one, but typically would not.
Expand Down

0 comments on commit c17682d

Please sign in to comment.