Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for IsAlreadyExists (0.32 sec)

  1. cmd/kubeadm/app/util/apiclient/idempotency.go

    		true, func(_ context.Context) (bool, error) {
    			ctx := context.Background()
    			if _, err := client.CoreV1().ConfigMaps(cm.ObjectMeta.Namespace).Create(ctx, cm, metav1.CreateOptions{}); err != nil {
    				if !apierrors.IsAlreadyExists(err) {
    					lastError = errors.Wrap(err, "unable to create ConfigMap")
    					return false, nil
    				}
    				if _, err := client.CoreV1().ConfigMaps(cm.ObjectMeta.Namespace).Update(ctx, cm, metav1.UpdateOptions{}); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Feb 18 11:14:32 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/errors/errors_test.go

    	b.Run("Nil", func(b *testing.B) {
    		for i := 0; i < b.N; i++ {
    			IsAlreadyExists(nil)
    		}
    	})
    
    	b.Run("Bare", func(b *testing.B) {
    		for i := 0; i < b.N; i++ {
    			IsAlreadyExists(err)
    		}
    	})
    
    	b.Run("Wrapped", func(b *testing.B) {
    		for i := 0; i < b.N; i++ {
    			IsAlreadyExists(wrapped)
    		}
    	})
    }
    
    func BenchmarkIsNotFoundWrappedErrors(b *testing.B) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 28 07:31:28 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  3. pkg/volume/util/nestedpendingoperations/nestedpendingoperations_test.go

    	// Assert
    	if err2 == nil {
    		t.Fatalf("NestedPendingOperations did not fail. Expected: <Failed to create operation with name \"%s\". An operation with that name already exists.> Actual: <no error>", volumeName)
    	}
    	if !IsAlreadyExists(err2) {
    		t.Fatalf("NestedPendingOperations did not return alreadyExistsError, got: %v", err2)
    	}
    }
    
    func Test_NestedPendingOperations_Negative_SecondThirdOpWithDifferentNames(t *testing.T) {
    	// Arrange
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 26 01:29:17 UTC 2022
    - 36.1K bytes
    - Viewed (0)
  4. tests/integration/pilot/mcs/discoverability/discoverability_test.go

    				defer wg.Done()
    
    				err := c.Dynamic().Resource(mcs.ServiceExportGVR).Namespace(echos.Namespace.Name()).Delete(context.TODO(),
    					serviceExport.Name, metav1.DeleteOptions{})
    				if err != nil && !kerrors.IsAlreadyExists(err) {
    					scopes.Framework.Warnf("failed deleting ServiceExport %s/%s in cluster %s: %v",
    						echos.Namespace, common.ServiceB, c.Name(), err)
    					return
    				}
    			}()
    		}
    
    		wg.Wait()
    	})
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  5. pkg/test/framework/components/istio/kube.go

    			ObjectMeta: metav1.ObjectMeta{
    				Labels:      nsLabels,
    				Annotations: nsAnnotations,
    				Name:        i.cfg.SystemNamespace,
    			},
    		}, metav1.CreateOptions{}); err != nil {
    			if errors.IsAlreadyExists(err) {
    				if _, err := c.Kube().CoreV1().Namespaces().Update(context.TODO(), &corev1.Namespace{
    					ObjectMeta: metav1.ObjectMeta{
    						Labels:      nsLabels,
    						Annotations: nsAnnotations,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 22:12:34 UTC 2024
    - 31.1K bytes
    - Viewed (0)
  6. pkg/volume/util/nestedpendingoperations/nestedpendingoperations.go

    func NewAlreadyExistsError(key operationKey) error {
    	return alreadyExistsError{key}
    }
    
    // IsAlreadyExists returns true if an error returned from
    // NestedPendingOperations indicates a new operation can not be started because
    // an operation with the same operation name is already executing.
    func IsAlreadyExists(err error) bool {
    	switch err.(type) {
    	case alreadyExistsError:
    		return true
    	default:
    		return false
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 26 01:29:17 UTC 2022
    - 12.6K bytes
    - Viewed (0)
  7. pkg/kubelet/volumemanager/reconciler/reconciler_common.go

    					}
    				}
    			}
    		}
    	}
    }
    
    // ignore nestedpendingoperations.IsAlreadyExists and exponentialbackoff.IsExponentialBackoff errors, they are expected.
    func isExpectedError(err error) bool {
    	return nestedpendingoperations.IsAlreadyExists(err) || exponentialbackoff.IsExponentialBackoff(err) || operationexecutor.IsMountFailedPreconditionError(err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 10:23:12 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  8. pkg/registry/rbac/rest/storage_rbac.go

    		existingRole.ResourceVersion = "" // clear this so the object can be created.
    		if _, err := clusterRoleClient.ClusterRoles().Create(context.TODO(), existingRole, metav1.CreateOptions{}); err != nil && !apierrors.IsAlreadyExists(err) {
    			return err
    		}
    	}
    
    	return nil
    }
    
    // primeSplitClusterRoleBindings ensures the existence of target ClusterRoleBindings
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 14 03:25:19 UTC 2022
    - 18.5K bytes
    - Viewed (0)
  9. pkg/test/framework/components/echo/kube/deployment.go

    		// create service account, the next workload command will use it to generate a token
    		err = createServiceAccount(cfg.Cluster.Kube(), cfg.Namespace.Name(), serviceAccount(cfg))
    		if err != nil && !kerrors.IsAlreadyExists(err) {
    			return err
    		}
    	}
    
    	if err := os.WriteFile(path.Join(dir, "workloadgroup.yaml"), []byte(wg), 0o600); err != nil {
    		return err
    	}
    
    	ist, err := istio.Get(ctx)
    	if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 09 12:26:52 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  10. pkg/controller/statefulset/stateful_pod_control.go

    		spc.recordPodEvent("create", set, pod, err)
    		return err
    	}
    	// If we created the PVCs attempt to create the Pod
    	err := spc.objectMgr.CreatePod(ctx, pod)
    	// sink already exists errors
    	if apierrors.IsAlreadyExists(err) {
    		return err
    	}
    	if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoDeletePVC) {
    		// Set PVC policy as much as is possible at this point.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 14.9K bytes
    - Viewed (0)
Back to top