Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add podPidsLimit / --pod-max-pids support #11898

Merged
merged 1 commit into from
Jul 7, 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
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.