Skip to content

Commit

Permalink
Merge pull request #11898 from uthark/oatamanenko/pod-max-pids
Browse files Browse the repository at this point in the history
Add podPidsLimit / --pod-max-pids support
  • Loading branch information
k8s-ci-robot authored Jul 7, 2021
2 parents 7f93801 + 7d013d5 commit 442e5ea
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/cluster_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,18 @@ spec:
housekeepingInterval: 30s
```

### Pod PIDs Limit
{{ kops_feature_table(kops_added_default='1.22', k8s_min='1.20') }}

`podPidsLimit` allows to configure the maximum number of pids (process ids) in any pod.
[Read more](https://kubernetes.io/docs/concepts/policy/pid-limiting/) in Kubernetes documentation.

```yaml
spec:
kubelet:
podPidsLimit: 1024
```

### Event QPS
{{ kops_feature_table(kops_added_default='1.19') }}

Expand Down
10 changes: 10 additions & 0 deletions k8s/crds/kops.k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2572,6 +2572,11 @@ spec:
description: config is the path to the config file or directory
of files
type: string
podPidsLimit:
description: PodPidsLimit is the maximum number of pids in any
pod.
format: int64
type: integer
protectKernelDefaults:
description: 'Default kubelet behaviour for kernel tuning. If
set, kubelet errors if any of kernel tunables is different than
Expand Down Expand Up @@ -2982,6 +2987,11 @@ spec:
description: config is the path to the config file or directory
of files
type: string
podPidsLimit:
description: PodPidsLimit is the maximum number of pids in any
pod.
format: int64
type: integer
protectKernelDefaults:
description: 'Default kubelet behaviour for kernel tuning. If
set, kubelet errors if any of kernel tunables is different than
Expand Down
5 changes: 5 additions & 0 deletions k8s/crds/kops.k8s.io_instancegroups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,11 @@ spec:
description: config is the path to the config file or directory
of files
type: string
podPidsLimit:
description: PodPidsLimit is the maximum number of pids in any
pod.
format: int64
type: integer
protectKernelDefaults:
description: 'Default kubelet behaviour for kernel tuning. If
set, kubelet errors if any of kernel tunables is different than
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ type KubeletConfigSpec struct {
ContainerLogMaxFiles *int32 `json:"containerLogMaxFiles,omitempty" flag:"container-log-max-files"`
// EnableCadvisorJsonEndpoints enables cAdvisor json `/spec` and `/stats/*` endpoints. Defaults to False.
EnableCadvisorJsonEndpoints *bool `json:"enableCadvisorJsonEndpoints,omitempty" flag:"enable-cadvisor-json-endpoints"`
// PodPidsLimit is the maximum number of pids in any pod.
PodPidsLimit *int64 `json:"podPidsLimit,omitempty" flag:"pod-max-pids"`
}

// KubeProxyConfig defines the configuration for a proxy
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ type KubeletConfigSpec struct {
ContainerLogMaxFiles *int32 `json:"containerLogMaxFiles,omitempty" flag:"container-log-max-files"`
// EnableCadvisorJsonEndpoints enables cAdvisor json `/spec` and `/stats/*` endpoints. Defaults to False.
EnableCadvisorJsonEndpoints *bool `json:"enableCadvisorJsonEndpoints,omitempty" flag:"enable-cadvisor-json-endpoints"`
// PodPidsLimit is the maximum number of pids in any pod.
PodPidsLimit *int64 `json:"podPidsLimit,omitempty" flag:"pod-max-pids"`
}

// KubeProxyConfig defines the configuration for a proxy
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/apis/kops/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 442e5ea

Please sign in to comment.