Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 22 for NewUUID (0.27 sec)

  1. pkg/serviceaccount/claims_test.go

    	"k8s.io/kubernetes/pkg/features"
    )
    
    func init() {
    	now = func() time.Time {
    		// epoch time: 1514764800
    		return time.Date(2018, time.January, 1, 0, 0, 0, 0, time.UTC)
    	}
    
    	newUUID = func() string {
    		// always return a fixed/static UUID for testing
    		return "fixed"
    	}
    }
    
    func TestClaims(t *testing.T) {
    	sa := core.ServiceAccount{
    		ObjectMeta: metav1.ObjectMeta{
    			Namespace: "myns",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  2. pkg/controller/deployment/deployment_controller_test.go

    	d := apps.Deployment{
    		TypeMeta: metav1.TypeMeta{APIVersion: "apps/v1", Kind: "Deployment"},
    		ObjectMeta: metav1.ObjectMeta{
    			UID:         uuid.NewUUID(),
    			Name:        name,
    			Namespace:   metav1.NamespaceDefault,
    			Annotations: make(map[string]string),
    		},
    		Spec: apps.DeploymentSpec{
    			Strategy: apps.DeploymentStrategy{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  3. pkg/kubelet/stats/cri_stats_provider_test.go

    			CreatedAt: time.Now().UnixNano(),
    		},
    	}
    	if terminated {
    		p.PodSandboxStatus.State = runtimeapi.PodSandboxState_SANDBOX_NOTREADY
    	}
    	p.PodSandboxStatus.Id = strings.ReplaceAll(string(uuid.NewUUID()), "-", "")
    	return p
    }
    
    func makeFakeContainer(sandbox *critest.FakePodSandbox, name string, attempt uint32, terminated bool) *critest.FakeContainer {
    	sandboxID := sandbox.PodSandboxStatus.Id
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  4. pkg/volume/util/operationexecutor/operation_executor_test.go

    		},
    	}
    }
    
    func getTestPodWithGCEPD(podName, pdName string) *v1.Pod {
    	return &v1.Pod{
    		ObjectMeta: metav1.ObjectMeta{
    			Name: podName,
    			UID:  types.UID(podName + string(uuid.NewUUID())),
    		},
    		Spec: v1.PodSpec{
    			Volumes: []v1.Volume{
    				{
    					Name: pdName,
    					VolumeSource: v1.VolumeSource{
    						GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{
    							PDName:   pdName,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 26.9K bytes
    - Viewed (0)
  5. cmd/kube-controller-manager/app/controllermanager.go

    	}
    
    	id, err := os.Hostname()
    	if err != nil {
    		return err
    	}
    
    	// add a uniquifier so that two processes on the same host don't accidentally both become active
    	id = id + "_" + string(uuid.NewUUID())
    
    	// leaderMigrator will be non-nil if and only if Leader Migration is enabled.
    	var leaderMigrator *leadermigration.LeaderMigrator = nil
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 13:03:53 UTC 2024
    - 37.5K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go

    	} else {
    		envelopemetrics.RecordKeyIDFromStatus(h.name, response.KeyID, h.apiServerID)
    		// unconditionally append as we filter out nil errors below
    		errs = append(errs, h.rotateDEKOnKeyIDChange(ctx, response.KeyID, string(uuid.NewUUID())))
    	}
    
    	if err := utilerrors.Reduce(utilerrors.NewAggregate(errs)); err != nil {
    		return fmt.Errorf("kmsv2 Provider %s is not healthy, error: %w", h.name, err)
    	}
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 16:56:39 UTC 2024
    - 41.2K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/test/integration/ratcheting_test.go

    		// schema takes effect
    		sch := u.newSchema.DeepCopy()
    		if sch.Properties == nil {
    			sch.Properties = map[string]apiextensionsv1.JSONSchemaProps{}
    		}
    
    		uuidString := string(uuid.NewUUID())
    		sentinelName := "__ratcheting_sentinel_field__"
    		sch.Properties[sentinelName] = apiextensionsv1.JSONSchemaProps{
    			Type: "string",
    			Enum: []apiextensionsv1.JSON{{
    				Raw: []byte(`"` + uuidString + `"`),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 59.5K bytes
    - Viewed (0)
  8. pkg/controller/daemon/daemon_controller_test.go

    		TimeAdded: nowPointer(),
    	}}
    )
    
    func newDaemonSet(name string) *apps.DaemonSet {
    	two := int32(2)
    	return &apps.DaemonSet{
    		ObjectMeta: metav1.ObjectMeta{
    			UID:       uuid.NewUUID(),
    			Name:      name,
    			Namespace: metav1.NamespaceDefault,
    		},
    		Spec: apps.DaemonSetSpec{
    			RevisionHistoryLimit: &two,
    			UpdateStrategy: apps.DaemonSetUpdateStrategy{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 111.4K bytes
    - Viewed (0)
  9. pkg/controller/job/job_controller_test.go

    	j := &batch.Job{
    		TypeMeta: metav1.TypeMeta{Kind: "Job"},
    		ObjectMeta: metav1.ObjectMeta{
    			Name:      name,
    			UID:       uuid.NewUUID(),
    			Namespace: metav1.NamespaceDefault,
    		},
    		Spec: batch.JobSpec{
    			Selector: &metav1.LabelSelector{
    				MatchLabels: map[string]string{"foo": "bar"},
    			},
    			Template: v1.PodTemplateSpec{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 15:36:36 UTC 2024
    - 229.2K bytes
    - Viewed (0)
  10. pkg/volume/testing/testing.go

    		if _, ok := fc.Options.Parameters[ExpectProvisionFailureKey]; ok {
    			return nil, fmt.Errorf("expected error")
    		}
    	}
    	fullpath := fmt.Sprintf("/%s/hostpath_pv/%s", os.TempDir(), uuid.NewUUID())
    
    	pv := &v1.PersistentVolume{
    		ObjectMeta: metav1.ObjectMeta{
    			Name: fc.Options.PVName,
    			Annotations: map[string]string{
    				util.VolumeDynamicallyCreatedByKey: "fakeplugin-provisioner",
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 12:32:15 UTC 2024
    - 53.3K bytes
    - Viewed (0)
Back to top