Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 62 for oldObj (0.16 sec)

  1. plugin/pkg/admission/gc/gc_admission_test.go

    			username:   "super",
    			resource:   api.SchemeGroupVersion.WithResource("pods"),
    			oldObj:     &api.Pod{},
    			newObj:     &api.Pod{},
    			checkError: expectNoError,
    		},
    		{
    			name:       "super-user, update, no objectref change two",
    			username:   "super",
    			resource:   api.SchemeGroupVersion.WithResource("pods"),
    			oldObj:     &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 21:28:42 UTC 2024
    - 24.5K bytes
    - Viewed (0)
  2. pkg/registry/core/persistentvolume/strategy_test.go

    	defer func() {
    		NowFunc = metav1.Now
    	}()
    	tests := []struct {
    		name        string
    		fg          bool
    		oldObj      *api.PersistentVolume
    		newObj      *api.PersistentVolume
    		expectedObj *api.PersistentVolume
    	}{
    		{
    			name: "feature enabled: timestamp is updated when phase changes",
    			fg:   true,
    			oldObj: &api.PersistentVolume{
    				ObjectMeta: metav1.ObjectMeta{
    					Name: "foo",
    				},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 11K bytes
    - Viewed (0)
  3. pkg/scheduler/util/utils_test.go

    func Test_As_KMetadata(t *testing.T) {
    	tests := []struct {
    		name    string
    		oldObj  interface{}
    		newObj  interface{}
    		wantErr bool
    	}{
    		{
    			name:    "nil old Pod",
    			oldObj:  nil,
    			newObj:  &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}},
    			wantErr: false,
    		},
    		{
    			name:    "nil new Pod",
    			oldObj:  &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}},
    			newObj:  nil,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Sep 21 01:40:44 UTC 2023
    - 14.5K bytes
    - Viewed (0)
  4. pkg/proxy/config/config.go

    func (c *ServiceCIDRConfig) handleServiceCIDREvent(oldObj, newObj interface{}) {
    	var oldServiceCIDR, newServiceCIDR *networkingv1alpha1.ServiceCIDR
    	var ok bool
    
    	if oldObj != nil {
    		oldServiceCIDR, ok = oldObj.(*networkingv1alpha1.ServiceCIDR)
    		if !ok {
    			utilruntime.HandleError(fmt.Errorf("unexpected object type: %v", oldObj))
    			return
    		}
    	}
    
    	if newObj != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/admission/conversion_test.go

    	gvk := func(g, v, k string) schema.GroupVersionKind {
    		return schema.GroupVersionKind{Group: g, Version: v, Kind: k}
    	}
    	attrs := func(obj, oldObj runtime.Object) Attributes {
    		return NewAttributesRecord(obj, oldObj, schema.GroupVersionKind{}, "", "", schema.GroupVersionResource{}, "", "", nil, false, nil)
    	}
    	u := func(data string) *unstructured.Unstructured {
    		t.Helper()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  6. plugin/pkg/admission/certificates/ctbattest/admission_test.go

    			clusterTrustBundleFeatureEnabled: true,
    			allowedName:                      "abc.com/xyz",
    			attributes: &testAttributes{
    				resource: certificatesapi.Resource("clustertrustbundles"),
    				oldObj: &certificatesapi.ClusterTrustBundle{
    					Spec: certificatesapi.ClusterTrustBundleSpec{},
    				},
    				obj: &certificatesapi.ClusterTrustBundle{
    					Spec: certificatesapi.ClusterTrustBundleSpec{},
    				},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation.go

    }
    
    func (s *Validator) validateExpressions(ctx context.Context, fldPath *field.Path, obj, oldObj interface{}, correlation ratchetingOptions, costBudget int64) (errs field.ErrorList, remainingBudget int64) {
    	sts := s.Schema
    
    	// guard against oldObj being a non-nil interface with a nil value
    	if oldObj != nil {
    		v := reflect.ValueOf(oldObj)
    		switch v.Kind() {
    		case reflect.Map, reflect.Pointer, reflect.Interface, reflect.Slice:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 18:21:31 UTC 2024
    - 32.2K bytes
    - Viewed (0)
  8. pkg/scheduler/framework/plugins/nodeports/node_ports_test.go

    		pod          *v1.Pod
    		oldObj       interface{}
    		expectedHint framework.QueueingHint
    		expectedErr  bool
    	}{
    		"backoff-wrong-old-object": {
    			pod:          podWithHostPort.Obj(),
    			oldObj:       "not-a-pod",
    			expectedHint: framework.Queue,
    			expectedErr:  true,
    		},
    		"skip-queue-on-unscheduled": {
    			pod:          podWithHostPort.Obj(),
    			oldObj:       st.MakePod().Obj(),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 11:02:11 UTC 2023
    - 10.1K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go

    		pod            *v1.Pod
    		oldObj, newObj interface{}
    		expectedHint   framework.QueueingHint
    		expectedErr    bool
    	}{
    		"backoff-wrong-new-object": {
    			pod:          &v1.Pod{},
    			newObj:       "not-a-pod",
    			expectedHint: framework.Queue,
    			expectedErr:  true,
    		},
    		"backoff-wrong-old-object": {
    			pod:          &v1.Pod{},
    			oldObj:       "not-a-pod",
    			newObj:       &v1.Pod{},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  10. pkg/scheduler/eventhandlers.go

    }
    
    func (sched *Scheduler) updateNodeInCache(oldObj, newObj interface{}) {
    	logger := sched.logger
    	oldNode, ok := oldObj.(*v1.Node)
    	if !ok {
    		logger.Error(nil, "Cannot convert oldObj to *v1.Node", "oldObj", oldObj)
    		return
    	}
    	newNode, ok := newObj.(*v1.Node)
    	if !ok {
    		logger.Error(nil, "Cannot convert newObj to *v1.Node", "newObj", newObj)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:21:04 UTC 2024
    - 24K bytes
    - Viewed (0)
Back to top