Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for PatchPodStatus (2.27 sec)

  1. pkg/util/pod/pod.go

    	"k8s.io/apimachinery/pkg/util/strategicpatch"
    	clientset "k8s.io/client-go/kubernetes"
    	podutil "k8s.io/kubernetes/pkg/api/v1/pod"
    )
    
    // PatchPodStatus patches pod status. It returns true and avoids an update if the patch contains no changes.
    func PatchPodStatus(ctx context.Context, c clientset.Interface, namespace, name string, uid types.UID, oldPodStatus, newPodStatus v1.PodStatus) (*v1.Pod, []byte, bool, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 07 15:22:29 UTC 2022
    - 3K bytes
    - Viewed (0)
  2. pkg/scheduler/util/utils.go

    	return apierrors.IsInternalError(err) || apierrors.IsServiceUnavailable(err) ||
    		net.IsConnectionRefused(err)
    }
    
    // PatchPodStatus calculates the delta bytes change from <old.Status> to <newStatus>,
    // and then submit a request to API server to patch the pod changes.
    func PatchPodStatus(ctx context.Context, cs kubernetes.Interface, old *v1.Pod, newStatus *v1.PodStatus) error {
    	if newStatus == nil {
    		return nil
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Sep 21 01:40:44 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  3. pkg/util/pod/pod_test.go

    		},
    	}
    	for _, tc := range testCases {
    		t.Run(tc.description, func(t *testing.T) {
    			_, patchBytes, unchanged, err := PatchPodStatus(context.TODO(), client, ns, name, uid, getPodStatus(), tc.mutate(getPodStatus()))
    			if err != nil {
    				t.Errorf("unexpected error: %v", err)
    			}
    			if unchanged != tc.expectUnchanged {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 07 15:22:29 UTC 2022
    - 4.5K bytes
    - Viewed (0)
Back to top