Merge pull request #48584 from yiqinguo/yiqinguo_eventtype

Automatic merge from submit-queue (batch tested with PRs 49444, 47864, 48584, 49395, 49118)

Move event type

Change SandboxChanged to a constant and move to the event package below.
**Release note**:
```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-07-24 13:52:36 -07:00 committed by GitHub
commit 86cc83c3eb
2 changed files with 2 additions and 1 deletions

View File

@ -62,6 +62,7 @@ const (
FailedNodeAllocatableEnforcement = "FailedNodeAllocatableEnforcement"
SuccessfulNodeAllocatableEnforcement = "NodeAllocatableEnforced"
UnsupportedMountOption = "UnsupportedMountOption"
SandboxChanged = "SandboxChanged"
// Image manager event reason list
InvalidDiskCapacity = "InvalidDiskCapacity"

View File

@ -552,7 +552,7 @@ func (m *kubeGenericRuntimeManager) SyncPod(pod *v1.Pod, _ v1.PodStatus, podStat
glog.Errorf("Couldn't make a ref to pod %q: '%v'", format.Pod(pod), err)
}
if podContainerChanges.SandboxID != "" {
m.recorder.Eventf(ref, v1.EventTypeNormal, "SandboxChanged", "Pod sandbox changed, it will be killed and re-created.")
m.recorder.Eventf(ref, v1.EventTypeNormal, events.SandboxChanged, "Pod sandbox changed, it will be killed and re-created.")
} else {
glog.V(4).Infof("SyncPod received new pod %q, will create a new sandbox for it", format.Pod(pod))
}