mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
make reasons constants with clarity
This commit is contained in:
@@ -191,7 +191,7 @@ func (im *realImageManager) GarbageCollect() error {
|
||||
// Check valid capacity.
|
||||
if capacity == 0 {
|
||||
err := fmt.Errorf("invalid capacity %d on device %q at mount point %q", capacity, fsInfo.Device, fsInfo.Mountpoint)
|
||||
im.recorder.Eventf(im.nodeRef, "InvalidDiskCapacity", err.Error())
|
||||
im.recorder.Eventf(im.nodeRef, container.InvalidDiskCapacity, err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ func (im *realImageManager) GarbageCollect() error {
|
||||
|
||||
if freed < amountToFree {
|
||||
err := fmt.Errorf("failed to garbage collect required amount of images. Wanted to free %d, but freed %d", amountToFree, freed)
|
||||
im.recorder.Eventf(im.nodeRef, "FreeDiskSpaceFailed", err.Error())
|
||||
im.recorder.Eventf(im.nodeRef, container.FreeDiskSpaceFailed, err.Error())
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user