Don't bump nr. of admitted volumes on retry

AddPodToVolume is called periodically, it does not make sense to bump
volume_manager_selinux_volumes_admitted_total on each call.
This commit is contained in:
Jan Safranek 2023-03-09 15:45:21 +01:00
parent 48ea6a3f3a
commit 05cd2ba863

View File

@ -357,10 +357,6 @@ func (dsw *desiredStateOfWorld) AddPodToVolume(
if err := handleSELinuxMetricError(fullErr, supported, seLinuxVolumeContextMismatchWarnings, seLinuxVolumeContextMismatchErrors); err != nil {
return "", err
}
} else {
if seLinuxFileLabel != "" {
seLinuxVolumesAdmitted.Add(1.0)
}
}
}
}