Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for setResourceVersion (0.43 sec)

  1. pkg/volume/util/resize_util_test.go

    		{
    			Type:               v1.PersistentVolumeClaimFileSystemResizePending,
    			Status:             v1.ConditionTrue,
    			LastTransitionTime: metav1.Now(),
    		},
    	}).get()
    	pvc1.SetResourceVersion("10")
    	pvc2 := pvc1.DeepCopy()
    	pvc2.Status.Capacity = v1.ResourceList{
    		v1.ResourceName("size"): resource.MustParse("10G"),
    	}
    	patchBytes, err := createPVCPatch(pvc1, pvc2, true /* addResourceVersionCheck */)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_test_context.go

    		}
    	})
    }
    
    func (p *PolicyTestContext[P, B, E]) updateOne(object runtime.Object) error {
    	objectMeta, err := meta.Accessor(object)
    	if err != nil {
    		return err
    	}
    	objectMeta.SetResourceVersion(string(uuid.NewUUID()))
    	objectGVK, gvr, err := p.inferGVK(object)
    	if err != nil {
    		return err
    	}
    
    	switch objectGVK {
    	case p.policyGVK:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 19K bytes
    - Viewed (0)
  3. operator/cmd/mesh/manifest_shared_test.go

    		if err := clnt.Create(ctx, check); err != nil {
    			return fmt.Errorf("could not inject object creation for fake: %w", err)
    		}
    	} else if err != nil {
    		return err
    	}
    	obj.SetResourceVersion(check.GetResourceVersion())
    	return clnt.Update(ctx, obj)
    }}
    
    // recreateSimpleTestEnv mocks fake kube api server which relies on a simple object tracker
    func recreateSimpleTestEnv() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Feb 20 22:39:28 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go

    						return err
    					}
    					// the first call to this function
    					// primes the cacher
    					if !hasBeenPrimed {
    						listAccessor.SetResourceVersion("100")
    						hasBeenPrimed = true
    						return nil
    					}
    					listAccessor.SetResourceVersion("105")
    					return nil
    				}
    				return s
    			}(),
    			verifyBackingStore: func(t *testing.T, s *dummyStorage) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 82.9K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go

    			if obj.GetResourceVersion() != "" {
    				return true, nil, errors.New("ResourceVersion must not be set on create")
    			}
    			obj.SetUID(types.UID(fmt.Sprintf("UID-%d", uidCounter)))
    			uidCounter++
    			obj.SetResourceVersion(fmt.Sprintf("%d", resourceVersionCounter))
    			resourceVersionCounter++
    		case "update":
    			uid := obj.GetUID()
    			resourceVersion := obj.GetResourceVersion()
    			if uid == "" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 07:57:10 UTC 2024
    - 61.9K bytes
    - Viewed (0)
  6. pilot/pkg/config/kube/gateway/deploymentcontroller.go

    	if !canManage {
    		log.Debugf("skipping %v/%v/%v, already managed", gvr, us.GetName(), us.GetNamespace())
    		return nil
    	}
    	// Ensure our canManage assertion is not stale
    	us.SetResourceVersion(resourceVersion)
    
    	log.Debugf("applying %v", string(j))
    	if err := d.patcher(gvr, us.GetName(), us.GetNamespace(), j); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon May 13 21:43:20 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  7. pkg/controller/deployment/deployment_controller_test.go

    			b.Errorf("Invalid map size, expected 2, got: %d", len(m))
    		}
    	}
    }
    
    func bumpResourceVersion(obj metav1.Object) {
    	ver, _ := strconv.ParseInt(obj.GetResourceVersion(), 10, 32)
    	obj.SetResourceVersion(strconv.FormatInt(ver+1, 10))
    }
    
    // generatePodFromRS creates a pod, with the input ReplicaSet's selector and its template
    func generatePodFromRS(rs *apps.ReplicaSet) *v1.Pod {
    	trueVar := true
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  8. pkg/controller/statefulset/stateful_set_control_test.go

    	obj, isObj := object.(metav1.Object)
    	if !isObj {
    		return
    	}
    	if version := obj.GetResourceVersion(); version == "" {
    		obj.SetResourceVersion("1")
    	} else if intValue, err := strconv.ParseInt(version, 10, 32); err == nil {
    		obj.SetResourceVersion(strconv.FormatInt(intValue+1, 10))
    	}
    }
    func TestParallelScale(t *testing.T) {
    	for _, tc := range []struct {
    		desc                        string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 07 19:01:47 UTC 2024
    - 108.7K bytes
    - Viewed (0)
  9. pkg/controller/daemon/daemon_controller_test.go

    			t.Fatalf("queue.Len() = %v, want %v", got, want)
    		}
    	}
    }
    
    func bumpResourceVersion(obj metav1.Object) {
    	ver, _ := strconv.ParseInt(obj.GetResourceVersion(), 10, 32)
    	obj.SetResourceVersion(strconv.FormatInt(ver+1, 10))
    }
    
    // getQueuedKeys returns a sorted list of keys in the queue.
    // It can be used to quickly check that multiple keys are in there.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 111.4K bytes
    - Viewed (0)
  10. pkg/controller/job/job_controller_test.go

    				}
    			}
    		})
    	}
    }
    
    func bumpResourceVersion(obj metav1.Object) {
    	ver, _ := strconv.ParseInt(obj.GetResourceVersion(), 10, 32)
    	obj.SetResourceVersion(strconv.FormatInt(ver+1, 10))
    }
    
    func TestJobApiBackoffReset(t *testing.T) {
    	t.Cleanup(setDurationDuringTest(&DefaultJobApiBackOff, fastJobApiBackoff))
    	_, ctx := ktesting.NewTestContext(t)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 15:36:36 UTC 2024
    - 229.2K bytes
    - Viewed (0)
Back to top