Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 29 for IsAlreadyExists (0.3 sec)

  1. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_test_context.go

    				if errors.IsAlreadyExists(err) {
    					return p.unstructuredTracker.Update(gvr, object, objectMeta.GetNamespace())
    				}
    				return err
    			}
    			return nil
    		} else if err := p.nativeTracker.Create(gvr, object, objectMeta.GetNamespace()); err != nil {
    			if errors.IsAlreadyExists(err) {
    				return p.nativeTracker.Update(gvr, object, objectMeta.GetNamespace())
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 19K bytes
    - Viewed (0)
  2. tests/integration/security/file_mounted_certs/main_test.go

    			"root-cert.pem":  caCert,
    		},
    	}
    
    	_, err = kubeAccessor.Kube().CoreV1().Secrets(namespace.Name()).Create(context.TODO(), secret, metav1.CreateOptions{})
    	if err != nil {
    		if kerrors.IsAlreadyExists(err) {
    			if _, err := kubeAccessor.Kube().CoreV1().Secrets(namespace.Name()).Update(context.TODO(), secret, metav1.UpdateOptions{}); err != nil {
    				return fmt.Errorf("failed updating secret %s: %v", secret.Name, err)
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 02 21:29:40 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go

    					// but the CRB is missing - i.e. the admin.conf user does not have permissions
    					// to create its own permission RBAC yet.
    					return true, nil
    				} else if apierrors.IsAlreadyExists(err) {
    					// If the CRB exists it means the admin.conf already has the right
    					// permissions; return.
    					crbExists = true
    					return true, nil
    				} else {
    					// Retry on any other error type.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 17:04:18 UTC 2024
    - 27K bytes
    - Viewed (0)
  4. pkg/webhooks/validation/controller/controller.go

    	istioClient := c.client.Istio().NetworkingV1alpha3()
    	_, err := istioClient.Gateways(c.o.WatchedNamespace).Create(context.TODO(), invalidGateway, createOptions)
    	if kerrors.IsAlreadyExists(err) {
    		updateOptions := metav1.UpdateOptions{DryRun: []string{metav1.DryRunAll}}
    		_, err = istioClient.Gateways(c.o.WatchedNamespace).Update(context.TODO(), invalidGateway, updateOptions)
    	}
    	if err == nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 28 16:52:19 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  5. pilot/pkg/status/distribution/reporter.go

    func CreateOrUpdateConfigMap(ctx context.Context, cm *corev1.ConfigMap, client v1.ConfigMapInterface) (res *corev1.ConfigMap, err error) {
    	if res, err = client.Create(ctx, cm, metav1.CreateOptions{}); err != nil {
    		if !kerrors.IsAlreadyExists(err) {
    			scope.Errorf("%v", err)
    			return nil, fmt.Errorf("unable to create ConfigMap: %w", err)
    		}
    
    		if res, err = client.Update(context.TODO(), cm, metav1.UpdateOptions{}); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jan 30 17:25:17 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  6. pkg/controlplane/reconcilers/lease.go

    	}
    
    	klog.Warningf("Resetting endpoints for master service %q to %v", serviceName, masterIPs)
    	if shouldCreate {
    		if _, err = r.epAdapter.Create(corev1.NamespaceDefault, e); errors.IsAlreadyExists(err) {
    			err = nil
    		}
    	} else {
    		_, err = r.epAdapter.Update(corev1.NamespaceDefault, e)
    	}
    	return err
    }
    
    // checkEndpointSubsetFormatWithLease determines if the endpoint is in the
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 11.3K bytes
    - Viewed (0)
  7. pkg/controlplane/controller/clusterauthenticationtrust/cluster_authentication_trust_controller.go

    		ObjectMeta: metav1.ObjectMeta{
    			Name:      ns,
    			Namespace: "",
    		},
    	}
    	_, err := nsClient.Namespaces().Create(context.TODO(), newNs, metav1.CreateOptions{})
    	if err != nil && apierrors.IsAlreadyExists(err) {
    		err = nil
    	}
    	return err
    }
    
    func writeConfigMap(configMapClient corev1client.ConfigMapsGetter, required *corev1.ConfigMap) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  8. pkg/registry/flowcontrol/ensurer/strategy.go

    			klog.V(2).InfoS(fmt.Sprintf("Successfully created %s", bootstrap.GetObjectKind().GroupVersionKind().Kind), "type", configurationType, "name", name)
    			return nil
    		}
    
    		if !apierrors.IsAlreadyExists(err) {
    			return fmt.Errorf("cannot create %s type=%s name=%q error=%w", bootstrap.GetObjectKind().GroupVersionKind().Kind, configurationType, name, err)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:40 UTC 2023
    - 14K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/phases/addons/dns/dns.go

    		// Ignore if the Service is invalid with this error message:
    		// 	Service "kube-dns" is invalid: spec.clusterIP: Invalid value: "10.96.0.10": provided IP is already allocated
    
    		if !apierrors.IsAlreadyExists(err) && !apierrors.IsInvalid(err) {
    			return errors.Wrap(err, "unable to create a new DNS service")
    		}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 11 10:21:20 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  10. tests/integration/helm/util.go

    	if _, err := cs.Kube().CoreV1().Namespaces().Create(context.TODO(), &v1.Namespace{
    		ObjectMeta: metav1.ObjectMeta{
    			Name: namespace,
    		},
    	}, metav1.CreateOptions{}); err != nil {
    		if kerrors.IsAlreadyExists(err) {
    			log.Debugf("%v namespace already exist", IstioNamespace)
    		} else {
    			t.Fatalf("failed to create %v namespace: %v", IstioNamespace, err)
    		}
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 09 19:04:51 UTC 2024
    - 18.7K bytes
    - Viewed (0)
Back to top