Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 176 for newobj (0.11 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/typeconverter_test.go

    	if err != nil {
    		t.Fatalf("Failed to convert object to typed: %v", err)
    	}
    	newObj, err := tc.TypedToObject(typed)
    	if err != nil {
    		t.Fatalf("Failed to convert typed to object: %v", err)
    	}
    	if !reflect.DeepEqual(obj, newObj) {
    		t.Errorf(`Round-trip failed:
    Original object:
    %#v
    Final object:
    %#v`, obj, newObj)
    	}
    }
    
    var result typed.TypedValue
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/plugins/schedulinggates/scheduling_gates.go

    		enableSchedulingQueueHint: fts.EnableSchedulingQueueHint,
    	}, nil
    }
    
    func (pl *SchedulingGates) isSchedulableAfterPodChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) {
    	_, modifiedPod, err := util.As[*v1.Pod](oldObj, newObj)
    	if err != nil {
    		return framework.Queue, err
    	}
    
    	if modifiedPod.UID != pod.UID {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  3. pkg/controller/storageversiongc/gc_controller.go

    	storageVersionInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
    		AddFunc: func(obj interface{}) {
    			c.onAddStorageVersion(logger, obj)
    		},
    		UpdateFunc: func(old, newObj interface{}) {
    			c.onUpdateStorageVersion(logger, old, newObj)
    		},
    	})
    
    	return c
    }
    
    // Run starts one worker.
    func (c *Controller) Run(ctx context.Context) {
    	logger := klog.FromContext(ctx)
    	defer utilruntime.HandleCrash()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 10K bytes
    - Viewed (0)
  4. pkg/registry/core/resourcequota/strategy.go

    // ValidateUpdate is the default update validation for an end user.
    func (resourcequotaStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {
    	newObj, oldObj := obj.(*api.ResourceQuota), old.(*api.ResourceQuota)
    	return validation.ValidateResourceQuotaUpdate(newObj, oldObj)
    }
    
    // WarningsOnUpdate returns warnings for the given update.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Feb 18 17:07:29 UTC 2022
    - 4.7K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go

    func (statusStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) {
    	newObj := obj.(*apiextensions.CustomResourceDefinition)
    	oldObj := old.(*apiextensions.CustomResourceDefinition)
    	newObj.Spec = oldObj.Spec
    
    	// Status updates are for only for updating status, not objectmeta.
    	metav1.ResetObjectMetaForStatus(&newObj.ObjectMeta, &newObj.ObjectMeta)
    }
    
    func (statusStrategy) AllowCreateOnUpdate() bool {
    	return false
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 19:06:46 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/admission/conversion_test.go

    				Attributes: attrs(
    					u(`{"apiVersion": "mygroup.k8s.io/v1","kind": "Flunder","metadata":{"name":"newobj"}}`),
    					u(`{"apiVersion": "mygroup.k8s.io/v1","kind": "Flunder","metadata":{"name":"oldobj"}}`),
    				),
    				VersionedObject:    u(`{"apiVersion": "mygroup.k8s.io/v1","kind": "Flunder","metadata":{"name":"newobj"}}`),
    				VersionedOldObject: u(`{"apiVersion": "mygroup.k8s.io/v1","kind": "Flunder","metadata":{"name":"oldobj"}}`),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  7. pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable.go

    // pod schedulable.
    func (pl *NodeUnschedulable) isSchedulableAfterNodeChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) {
    	_, modifiedNode, err := util.As[*v1.Node](oldObj, newObj)
    	if err != nil {
    		return framework.Queue, err
    	}
    
    	if !modifiedNode.Spec.Unschedulable {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Dec 16 12:50:11 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  8. plugin/pkg/admission/gc/gc_admission.go

    			}
    		}
    	}
    
    	return nil
    
    }
    
    func isChangingOwnerReference(newObj, oldObj runtime.Object) bool {
    	newMeta, err := meta.Accessor(newObj)
    	if err != nil {
    		// if we don't have objectmeta, we don't have the object reference
    		return false
    	}
    
    	if oldObj == nil {
    		return len(newMeta.GetOwnerReferences()) > 0
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 05 02:24:38 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  9. pkg/api/testing/unstructured_test.go

    		return
    	}
    
    	newObj := reflect.New(reflect.TypeOf(item).Elem()).Interface().(runtime.Object)
    	err = runtime.DefaultUnstructuredConverter.FromUnstructured(newUnstr, newObj)
    	if err != nil {
    		t.Errorf("FromUnstructured failed: %v", err)
    		return
    	}
    
    	if !apiequality.Semantic.DeepEqual(item, newObj) {
    		t.Errorf("Object changed, diff: %v", cmp.Diff(item, newObj))
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  10. pkg/scheduler/framework/plugins/interpodaffinity/plugin.go

    	return
    }
    
    func (pl *InterPodAffinity) isSchedulableAfterPodChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) {
    	originalPod, modifiedPod, err := util.As[*v1.Pod](oldObj, newObj)
    	if err != nil {
    		return framework.Queue, err
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 12 03:08:44 UTC 2024
    - 10.3K bytes
    - Viewed (0)
Back to top