We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d199cf5 commit e9a20b1Copy full SHA for e9a20b1
pkg/security/apis/security/v1/defaults.go
@@ -12,9 +12,17 @@ func AddDefaultingFuncs(scheme *runtime.Scheme) error {
12
scc := obj.(*v1.SecurityContextConstraints)
13
sccdefaults.SetDefaults_SCC(scc)
14
15
- // Default RunAsGroup to RunAsAny if not set
+ // Default RunAsGroup to MustRunAs with ranges if not set
16
if len(scc.RunAsGroup.Type) == 0 {
17
- scc.RunAsGroup.Type = v1.RunAsGroupStrategyRunAsAny
+ min := int64(1000)
18
+ max := int64(65534)
19
+ scc.RunAsGroup.Type = v1.RunAsGroupStrategyMustRunAs
20
+ scc.RunAsGroup.Ranges = []v1.RunAsGroupIDRange{
21
+ {
22
+ Min: &min,
23
+ Max: &max,
24
+ },
25
+ }
26
}
27
})
28
0 commit comments