Skip to content

Commit 6422002

Browse files
committed
SCC: add {AllowedUnsafe,Forbidden}Sysctls
1 parent da58561 commit 6422002

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

security/v1/types.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,26 @@ type SecurityContextConstraints struct {
104104
// used to generate a value for a pod the first non-wildcard profile will be used as
105105
// the default.
106106
SeccompProfiles []string `json:"seccompProfiles,omitempty" protobuf:"bytes,20,opt,name=seccompProfiles"`
107+
108+
// AllowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none.
109+
// Each entry is either a plain sysctl name or ends in "*" in which case it is considered
110+
// as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed.
111+
// Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.
112+
//
113+
// Examples:
114+
// e.g. "foo/*" allows "foo/bar", "foo/baz", etc.
115+
// e.g. "foo.*" allows "foo.bar", "foo.baz", etc.
116+
// +optional
117+
AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty" protobuf:"bytes,24,rep,name=allowedUnsafeSysctls"`
118+
// ForbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none.
119+
// Each entry is either a plain sysctl name or ends in "*" in which case it is considered
120+
// as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.
121+
//
122+
// Examples:
123+
// e.g. "foo/*" forbids "foo/bar", "foo/baz", etc.
124+
// e.g. "foo.*" forbids "foo.bar", "foo.baz", etc.
125+
// +optional
126+
ForbiddenSysctls []string `json:"forbiddenSysctls,omitempty" protobuf:"bytes,25,rep,name=forbiddenSysctls"`
107127
}
108128

109129
// FS Type gives strong typing to different file systems that are used by volumes.

0 commit comments

Comments
 (0)