init container default open privileged mode

This commit is contained in:
barnettZQG 2021-03-31 15:22:35 +08:00
parent 728f58e319
commit 6a806a6466

View File

@ -127,6 +127,10 @@ func conversionServicePlugin(as *typesv1.AppService, dbmanager db.Manager) ([]v1
meshPluginID = pluginR.PluginID
}
if pluginModel == model.InitPlugin {
if strings.ToLower(os.Getenv("DISABLE_INIT_CONTAINER_ENABLE_SECURITY")) != "true" {
//init container default open security
pc.SecurityContext = &corev1.SecurityContext{Privileged: util.Bool(true)}
}
initContainers = append(initContainers, pc)
} else {
containers = append(containers, pc)