mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
Update SELinux context log
SELinux context discovered from Pod is not final, it can be cleared when a volume plugin does not support SELinux or the volume is not ReadWriteOncePod. Update the existing log line + add a new one for easier debugging.
This commit is contained in:
@@ -290,7 +290,7 @@ func (dsw *desiredStateOfWorld) AddPodToVolume(
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
klog.V(4).InfoS("volume final SELinux label decided", "volume", volumeSpec.Name(), "label", seLinuxFileLabel)
|
||||
klog.V(4).InfoS("expected volume SELinux label context", "volume", volumeSpec.Name(), "label", seLinuxFileLabel)
|
||||
|
||||
if vol, volumeExists := dsw.volumesToMount[volumeName]; !volumeExists {
|
||||
var sizeLimit *resource.Quantity
|
||||
@@ -309,6 +309,7 @@ func (dsw *desiredStateOfWorld) AddPodToVolume(
|
||||
}
|
||||
if !util.VolumeSupportsSELinuxMount(volumeSpec) {
|
||||
// Clear SELinux label for the volume with unsupported access modes.
|
||||
klog.V(4).InfoS("volume does not support SELinux context mount, clearing the expected label", "volume", volumeSpec.Name())
|
||||
seLinuxFileLabel = ""
|
||||
}
|
||||
if seLinuxFileLabel != "" {
|
||||
|
Reference in New Issue
Block a user