Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 45 for oldObj (0.46 sec)

  1. pkg/scheduler/framework/plugins/schedulinggates/scheduling_gates_test.go

    		})
    	}
    }
    
    func Test_isSchedulableAfterPodChange(t *testing.T) {
    	testcases := map[string]struct {
    		pod            *v1.Pod
    		oldObj, newObj interface{}
    		expectedHint   framework.QueueingHint
    		expectedErr    bool
    	}{
    		"backoff-wrong-old-object": {
    			pod:          &v1.Pod{},
    			oldObj:       "not-a-pod",
    			expectedHint: framework.Queue,
    			expectedErr:  true,
    		},
    		"backoff-wrong-new-object": {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/equality.go

    	// 	except for timestamp, but the objects are the different. This is the
    	//	slow path which checks the full object.
    	oldAccessor, err := meta.Accessor(oldObj)
    	if err != nil {
    		return nil, fmt.Errorf("failed to acquire accessor for oldObj: %v", err)
    	}
    
    	accessor, err := meta.Accessor(newObj)
    	if err != nil {
    		return nil, fmt.Errorf("failed to acquire accessor for newObj: %v", err)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 28 14:56:34 UTC 2022
    - 5.3K bytes
    - Viewed (0)
  3. pkg/registry/core/configmap/strategy.go

    	return false
    }
    
    func (strategy) PrepareForUpdate(ctx context.Context, newObj, oldObj runtime.Object) {
    	oldConfigMap := oldObj.(*api.ConfigMap)
    	newConfigMap := newObj.(*api.ConfigMap)
    	dropDisabledFields(newConfigMap, oldConfigMap)
    }
    
    func (strategy) ValidateUpdate(ctx context.Context, newObj, oldObj runtime.Object) field.ErrorList {
    	oldCfg, newCfg := oldObj.(*api.ConfigMap), newObj.(*api.ConfigMap)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 27 20:38:11 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  4. pkg/scheduler/util/utils.go

    		}
    	}
    
    	if oldObj != nil {
    		if realOldObj, ok := oldObj.(cache.DeletedFinalStateUnknown); ok {
    			oldObj = realOldObj.Obj
    		}
    		oldTyped, ok = oldObj.(T)
    		if !ok {
    			return oldTyped, newTyped, fmt.Errorf("expected %T, but got %T", oldTyped, oldObj)
    		}
    	}
    	return oldTyped, newTyped, 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)
  5. plugin/pkg/auth/authorizer/node/graph_populator.go

    	g.updateVolumeAttachment(nil, obj)
    }
    
    func (g *graphPopulator) updateVolumeAttachment(oldObj, obj interface{}) {
    	attachment := obj.(*storagev1.VolumeAttachment)
    	if oldObj != nil {
    		// skip add if node name is identical
    		oldAttachment := oldObj.(*storagev1.VolumeAttachment)
    		if oldAttachment.Spec.NodeName == attachment.Spec.NodeName {
    			return
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  6. pkg/registry/rbac/clusterrole/policybased/storage.go

    		clusterRole := obj.(*rbac.ClusterRole)
    		oldClusterRole := oldObj.(*rbac.ClusterRole)
    
    		// if we're only mutating fields needed for the GC to eventually delete this obj, return
    		if rbacregistry.IsOnlyMutatingGCFields(obj, oldObj, kapihelper.Semantic) {
    			return obj, nil
    		}
    
    		rules := clusterRole.Rules
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 18 10:11:16 UTC 2022
    - 5.2K bytes
    - Viewed (0)
  7. pkg/registry/certificates/certificates/strategy_test.go

    	}()
    
    	tests := []struct {
    		name        string
    		newObj      *certapi.CertificateSigningRequest
    		oldObj      *certapi.CertificateSigningRequest
    		expectedObj *certapi.CertificateSigningRequest
    	}{
    		{
    			name:        "no-op",
    			newObj:      &certapi.CertificateSigningRequest{},
    			oldObj:      &certapi.CertificateSigningRequest{},
    			expectedObj: &certapi.CertificateSigningRequest{},
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 15 14:34:53 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  8. pkg/registry/apps/daemonset/strategy_test.go

    			t.Errorf("Unexpected error list, expected: %v, actual: %v", test.expectedErrorList, errorList)
    		}
    	}
    }
    
    func TestValidateToleratingBadLabels(t *testing.T) {
    	oldObj := newDaemonSetWithSelectorLabels(map[string]string{"a": "b"}, 1)
    	oldObj.Spec.Selector.MatchExpressions = []metav1.LabelSelectorRequirement{{Key: "key", Operator: metav1.LabelSelectorOpNotIn, Values: []string{"bad value"}}}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Nov 08 01:52:02 UTC 2022
    - 4.7K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/util/peerproxy/peerproxy.go

    	h.storageversionInformer = svi.Informer()
    
    	svi.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
    		AddFunc: func(obj interface{}) {
    			h.addSV(obj)
    		},
    		UpdateFunc: func(oldObj, newObj interface{}) {
    			h.updateSV(oldObj, newObj)
    		},
    		DeleteFunc: func(obj interface{}) {
    			h.deleteSV(obj)
    		}})
    	return h
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 19 00:36:22 UTC 2023
    - 2K bytes
    - Viewed (0)
  10. pkg/kube/kclient/index.go

    			addObj(obj)
    			idx.mu.Unlock()
    			if delegate != nil {
    				delegate.OnAdd(obj, initialList)
    			}
    		},
    		UpdateFunc: func(oldObj, newObj any) {
    			idx.mu.Lock()
    			deleteObj(oldObj)
    			addObj(newObj)
    			idx.mu.Unlock()
    			if delegate != nil {
    				delegate.OnUpdate(oldObj, newObj)
    			}
    		},
    		DeleteFunc: func(obj any) {
    			idx.mu.Lock()
    			deleteObj(obj)
    			idx.mu.Unlock()
    			if delegate != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 04 03:49:30 UTC 2023
    - 3.5K bytes
    - Viewed (0)
Back to top