forked from LaconicNetwork/kompose
Added support for group_add key
This PR will add support for `group_add` key which will map to supplemental group in pod security context.
This commit is contained in:
@@ -431,6 +431,11 @@ func (k *Kubernetes) UpdateKubernetesObjects(name string, service kobject.Servic
|
||||
}
|
||||
}
|
||||
|
||||
//set supplementalGroups
|
||||
if service.GroupAdd != nil {
|
||||
podSecurityContext.SupplementalGroups = service.GroupAdd
|
||||
}
|
||||
|
||||
// Setup security context
|
||||
securityContext := &api.SecurityContext{}
|
||||
if service.Privileged {
|
||||
|
||||
@@ -55,6 +55,7 @@ func newServiceConfig() kobject.ServiceConfig {
|
||||
TmpFs: []string{"/tmp"},
|
||||
Replicas: 2,
|
||||
Volumes: []kobject.Volumes{{SvcName: "app", MountPath: "/tmp/volume", PVCName: "app-claim0"}},
|
||||
GroupAdd: []int64{1003, 1005},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user