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:
Suraj Narwade
2017-08-10 11:54:35 +05:30
parent a9bffa6c6a
commit 641f8f8932
14 changed files with 282 additions and 33 deletions
+5
View File
@@ -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},
}
}