mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 02:09:56 +00:00
Add SELinux support to CSI
This commit is contained in:
parent
598ca5accc
commit
080d2dfe8f
@ -252,10 +252,18 @@ func (c *csiMountMgr) SetUpAt(dir string, fsGroup *int64) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *csiMountMgr) GetAttributes() volume.Attributes {
|
func (c *csiMountMgr) GetAttributes() volume.Attributes {
|
||||||
|
mounter := c.plugin.host.GetMounter(c.plugin.GetPluginName())
|
||||||
|
path := c.GetPath()
|
||||||
|
supportSelinux, err := mounter.GetSELinuxSupport(path)
|
||||||
|
if err != nil {
|
||||||
|
glog.V(2).Info(log("error checking for SELinux support: %s", err))
|
||||||
|
// Best guess
|
||||||
|
supportSelinux = false
|
||||||
|
}
|
||||||
return volume.Attributes{
|
return volume.Attributes{
|
||||||
ReadOnly: c.readOnly,
|
ReadOnly: c.readOnly,
|
||||||
Managed: !c.readOnly,
|
Managed: !c.readOnly,
|
||||||
SupportsSELinux: false,
|
SupportsSELinux: supportSelinux,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user