Commit 86cc83c3 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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 ```
parents 633079eb 5417a1d5
...@@ -62,6 +62,7 @@ const ( ...@@ -62,6 +62,7 @@ const (
FailedNodeAllocatableEnforcement = "FailedNodeAllocatableEnforcement" FailedNodeAllocatableEnforcement = "FailedNodeAllocatableEnforcement"
SuccessfulNodeAllocatableEnforcement = "NodeAllocatableEnforced" SuccessfulNodeAllocatableEnforcement = "NodeAllocatableEnforced"
UnsupportedMountOption = "UnsupportedMountOption" UnsupportedMountOption = "UnsupportedMountOption"
SandboxChanged = "SandboxChanged"
// Image manager event reason list // Image manager event reason list
InvalidDiskCapacity = "InvalidDiskCapacity" InvalidDiskCapacity = "InvalidDiskCapacity"
......
...@@ -552,7 +552,7 @@ func (m *kubeGenericRuntimeManager) SyncPod(pod *v1.Pod, _ v1.PodStatus, podStat ...@@ -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) glog.Errorf("Couldn't make a ref to pod %q: '%v'", format.Pod(pod), err)
} }
if podContainerChanges.SandboxID != "" { 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 { } else {
glog.V(4).Infof("SyncPod received new pod %q, will create a new sandbox for it", format.Pod(pod)) glog.V(4).Infof("SyncPod received new pod %q, will create a new sandbox for it", format.Pod(pod))
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment