KEP-3619: Fine-grained SupplementalGroups control (#117842)
* Add `Linux{Sandbox,Container}SecurityContext.SupplementalGroupsPolicy` and `ContainerStatus.user` in cri-api * Add `PodSecurityContext.SupplementalGroupsPolicy`, `ContainerStatus.User` and its featuregate * Implement DropDisabledPodFields for PodSecurityContext.SupplementalGroupsPolicy and ContainerStatus.User fields * Implement kubelet so to wire between SecurityContext.SupplementalGroupsPolicy/ContainerStatus.User and cri-api in kubelet * Clarify `SupplementalGroupsPolicy` is an OS depdendent field. * Make `ContainerStatus.User` is initially attached user identity to the first process in the ContainerStatus It is because, the process identity can be dynamic if the initially attached identity has enough privilege calling setuid/setgid/setgroups syscalls in Linux. * Rewording suggestion applied * Add TODO comment for updating SupplementalGroupsPolicy default value in v1.34 * Added validations for SupplementalGroupsPolicy and ContainerUser * No need featuregate check in validation when adding new field with no default value * fix typo: identitiy -> identity
This commit is contained in:
@@ -933,6 +933,13 @@ const (
|
||||
//
|
||||
// Allows recursive read-only mounts.
|
||||
RecursiveReadOnlyMounts featuregate.Feature = "RecursiveReadOnlyMounts"
|
||||
|
||||
// owner: @everpeace
|
||||
// kep: https://kep.k8s.io/3619
|
||||
// alpha: v1.31
|
||||
//
|
||||
// Enable SupplementalGroupsPolicy feature in PodSecurityContext
|
||||
SupplementalGroupsPolicy featuregate.Feature = "SupplementalGroupsPolicy"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -1187,6 +1194,8 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
|
||||
|
||||
SELinuxMount: {Default: false, PreRelease: featuregate.Alpha},
|
||||
|
||||
SupplementalGroupsPolicy: {Default: false, PreRelease: featuregate.Alpha},
|
||||
|
||||
// inherited features from generic apiserver, relisted here to get a conflict if it is changed
|
||||
// unintentionally on either side:
|
||||
|
||||
|
Reference in New Issue
Block a user