Skip to content

Commit

Permalink
Merge pull request #15924 from hakman/automated-cherry-pick-of-#15919…
Browse files Browse the repository at this point in the history
…-upstream-release-1.28

Automated cherry pick of #15919: Update kubelet API with SeccompDefault option.
  • Loading branch information
k8s-ci-robot committed Sep 19, 2023
2 parents f151ac2 + 3ed2b31 commit 5dda7f5
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/cluster_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,20 @@ spec:

Note that Kubelet will fail to install the shutdown inhibtor on systems where logind is configured with an `InhibitDelayMaxSeconds` lower than `shutdownGracePeriod`. On Ubuntu, this setting is 30 seconds.

### SeccompDefault

[SeccompDefault](https://kubernetes.io/blog/2021/08/25/seccomp-default/) enables the use of `RuntimeDefault` as the default seccomp profile for all workloads. (Default: false)

Note that a feature gate is required to enable the feature, and the feature is turned on using kubelet config.

```yaml
spec:
kubelet:
featureGates:
SeccompDefault: "true"
seccompDefault: true
```

## kubeScheduler

This block contains configurations for `kube-scheduler`. See https://kubernetes.io/docs/admin/kube-scheduler/
Expand Down
8 changes: 8 additions & 0 deletions k8s/crds/kops.k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3942,6 +3942,10 @@ spec:
description: RuntimeRequestTimeout is timeout for runtime requests
on - pull, logs, exec and attach
type: string
seccompDefault:
description: SeccompDefault enables the use of `RuntimeDefault`
as the default seccomp profile for all workloads.
type: boolean
seccompProfileRoot:
description: SeccompProfileRoot is the directory path for seccomp
profiles.
Expand Down Expand Up @@ -4379,6 +4383,10 @@ spec:
description: RuntimeRequestTimeout is timeout for runtime requests
on - pull, logs, exec and attach
type: string
seccompDefault:
description: SeccompDefault enables the use of `RuntimeDefault`
as the default seccomp profile for all workloads.
type: boolean
seccompProfileRoot:
description: SeccompProfileRoot is the directory path for seccomp
profiles.
Expand Down
4 changes: 4 additions & 0 deletions k8s/crds/kops.k8s.io_instancegroups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,10 @@ spec:
description: RuntimeRequestTimeout is timeout for runtime requests
on - pull, logs, exec and attach
type: string
seccompDefault:
description: SeccompDefault enables the use of `RuntimeDefault`
as the default seccomp profile for all workloads.
type: boolean
seccompProfileRoot:
description: SeccompProfileRoot is the directory path for seccomp
profiles.
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 @@ -57,6 +57,8 @@ type KubeletConfigSpec struct {
HostnameOverride string `json:"hostnameOverride,omitempty" flag:"hostname-override"`
// PodInfraContainerImage is the image whose network/ipc containers in each pod will use.
PodInfraContainerImage string `json:"podInfraContainerImage,omitempty" flag:"pod-infra-container-image"`
// SeccompDefault enables the use of `RuntimeDefault` as the default seccomp profile for all workloads.
SeccompDefault *bool `json:"seccompDefault,omitempty" flag:"seccomp-default"`
// SeccompProfileRoot is the directory path for seccomp profiles.
SeccompProfileRoot *string `json:"seccompProfileRoot,omitempty" flag:"seccomp-profile-root"`
// AllowPrivileged enables containers to request privileged mode (defaults to false)
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 @@ -57,6 +57,8 @@ type KubeletConfigSpec struct {
HostnameOverride string `json:"hostnameOverride,omitempty" flag:"hostname-override"`
// PodInfraContainerImage is the image whose network/ipc containers in each pod will use.
PodInfraContainerImage string `json:"podInfraContainerImage,omitempty" flag:"pod-infra-container-image"`
// SeccompDefault enables the use of `RuntimeDefault` as the default seccomp profile for all workloads.
SeccompDefault *bool `json:"seccompDefault,omitempty" flag:"seccomp-default"`
// SeccompProfileRoot is the directory path for seccomp profiles.
SeccompProfileRoot *string `json:"seccompProfileRoot,omitempty" flag:"seccomp-profile-root"`
// AllowPrivileged enables containers to request privileged mode (defaults to false)
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.

2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha3/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ type KubeletConfigSpec struct {
HostnameOverride string `json:"-"`
// PodInfraContainerImage is the image whose network/ipc containers in each pod will use.
PodInfraContainerImage string `json:"podInfraContainerImage,omitempty" flag:"pod-infra-container-image"`
// SeccompDefault enables the use of `RuntimeDefault` as the default seccomp profile for all workloads.
SeccompDefault *bool `json:"seccompDefault,omitempty" flag:"seccomp-default"`
// SeccompProfileRoot is the directory path for seccomp profiles.
SeccompProfileRoot *string `json:"seccompProfileRoot,omitempty" flag:"seccomp-profile-root"`
// AllowPrivileged was removed.
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha3/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/v1alpha3/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 5dda7f5

Please sign in to comment.