mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Fix sync pod log format and a func typo.
This commit is contained in:
parent
37016c3364
commit
8dc401d141
@ -477,7 +477,7 @@ func (m *manager) syncPod(uid types.UID, status versionedPodStatus) {
|
||||
// TODO: make me easier to express from client code
|
||||
pod, err := m.kubeClient.CoreV1().Pods(status.podNamespace).Get(status.podName, metav1.GetOptions{})
|
||||
if errors.IsNotFound(err) {
|
||||
klog.V(3).Infof("Pod %q (%s) does not exist on the server", status.podName, uid)
|
||||
klog.V(3).Infof("Pod %q does not exist on the server", format.PodDesc(status.podName, status.podNamespace, uid))
|
||||
// If the Pod is deleted the status will be cleared in
|
||||
// RemoveOrphanedStatuses, so we just ignore the update here.
|
||||
return
|
||||
|
@ -28,7 +28,7 @@ import (
|
||||
|
||||
// PatchPodStatus patches pod status.
|
||||
func PatchPodStatus(c clientset.Interface, namespace, name string, oldPodStatus, newPodStatus v1.PodStatus) (*v1.Pod, []byte, error) {
|
||||
patchBytes, err := preparePatchBytesforPodStatus(namespace, name, oldPodStatus, newPodStatus)
|
||||
patchBytes, err := preparePatchBytesForPodStatus(namespace, name, oldPodStatus, newPodStatus)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
@ -40,7 +40,7 @@ func PatchPodStatus(c clientset.Interface, namespace, name string, oldPodStatus,
|
||||
return updatedPod, patchBytes, nil
|
||||
}
|
||||
|
||||
func preparePatchBytesforPodStatus(namespace, name string, oldPodStatus, newPodStatus v1.PodStatus) ([]byte, error) {
|
||||
func preparePatchBytesForPodStatus(namespace, name string, oldPodStatus, newPodStatus v1.PodStatus) ([]byte, error) {
|
||||
oldData, err := json.Marshal(v1.Pod{
|
||||
Status: oldPodStatus,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user