Skip to content

Commit

Permalink
apply Restricted Pod Security Standard on sidecar container
Browse files Browse the repository at this point in the history
  • Loading branch information
songjiaxun committed Aug 10, 2023
1 parent 4f29a54 commit 6a0bdba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/webhook/sidecar_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const (
)

func GetSidecarContainerSpec(c *Config) v1.Container {
// The sidecar container follows Restricted Pod Security Standard,
// see https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
return v1.Container{
Name: SidecarContainerName,
Image: c.ContainerImage,
Expand All @@ -44,7 +46,7 @@ func GetSidecarContainerSpec(c *Config) v1.Container {
ReadOnlyRootFilesystem: pointer.Bool(true),
Capabilities: &v1.Capabilities{
Drop: []v1.Capability{
v1.Capability("all"),
v1.Capability("ALL"),
},
},
SeccompProfile: &v1.SeccompProfile{Type: v1.SeccompProfileTypeRuntimeDefault},
Expand Down

0 comments on commit 6a0bdba

Please sign in to comment.