mirror of
https://github.com/rancher/rke.git
synced 2025-09-11 03:49:33 +00:00
Revert "Do not rewrite SELinux labels on volume mounts"
This commit is contained in:
committed by
GitHub
parent
e0b892247f
commit
51a6b50a84
@@ -52,7 +52,6 @@ const (
|
||||
|
||||
ContainerNameLabel = "io.rancher.rke.container.name"
|
||||
MCSLabel = "label=level:s0:c1000,c1001"
|
||||
SELinuxLabel = "label=type:rke_container_t"
|
||||
)
|
||||
|
||||
type RestartFunc func(context.Context, *hosts.Host) error
|
||||
@@ -143,10 +142,6 @@ func GetProcessConfig(process v3.Process, host *hosts.Host) (*container.Config,
|
||||
hostCfg.SecurityOpt = []string{MCSLabel}
|
||||
}
|
||||
}
|
||||
// We apply the label because we do not rewrite SELinux labels anymore on volume mounts (no :z)
|
||||
logrus.Debugf("Applying security opt label [%s] for etcd container on host [%s]", SELinuxLabel, host.Address)
|
||||
hostCfg.SecurityOpt = append(hostCfg.SecurityOpt, SELinuxLabel)
|
||||
|
||||
}
|
||||
return imageCfg, hostCfg, process.HealthCheck.URL
|
||||
}
|
||||
|
Reference in New Issue
Block a user