- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 32 for IsAlreadyExists (0.43 sec)
-
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) -
pkg/util/goroutinemap/goroutinemap_test.go
// Assert if err2 == nil { t.Fatalf("NewGoRoutine did not fail. Expected: <Failed to create operation with name \"%s\". An operation with that name already exists.> Actual: <no error>", operationName) } if !IsAlreadyExists(err2) { t.Fatalf("NewGoRoutine did not return alreadyExistsError, got: %v", err2) } } func Test_NewGoRoutineMap_Negative_SecondOpBeforeFirstCompletesWithExpBackoff(t *testing.T) { // Arrange
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 11 14:09:48 UTC 2017 - 14.9K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
pkg/controller/history/controller_history.go
clone.Name = ControllerRevisionName(parent.GetName(), hash) ns := parent.GetNamespace() created, err := rh.client.AppsV1().ControllerRevisions(ns).Create(context.TODO(), clone, metav1.CreateOptions{}) if errors.IsAlreadyExists(err) { exists, err := rh.client.AppsV1().ControllerRevisions(ns).Get(context.TODO(), clone.Name, metav1.GetOptions{}) if err != nil { return nil, err }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 05 13:33:52 UTC 2021 - 18.2K bytes - Viewed (0)