- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 58 for IsAlreadyExists (0.2 sec)
-
staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go
if _, ok := knownReasons[reason]; !ok && code == http.StatusNotFound { return true } return false } // IsAlreadyExists determines if the err is an error which indicates that a specified resource already exists. // It supports wrapped errors and returns false when the error is nil. func IsAlreadyExists(err error) bool { return ReasonForError(err) == metav1.StatusReasonAlreadyExists }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 21 03:41:32 UTC 2022 - 30.5K bytes - Viewed (0) -
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) -
pilot/pkg/serviceregistry/serviceregistry_test.go
} } func makePod(t *testing.T, c kubernetes.Interface, pod *v1.Pod) { t.Helper() newPod, err := c.CoreV1().Pods(pod.Namespace).Create(context.Background(), pod, metav1.CreateOptions{}) if kerrors.IsAlreadyExists(err) { newPod, err = c.CoreV1().Pods(pod.Namespace).Update(context.Background(), pod, metav1.UpdateOptions{}) } if err != nil { t.Fatal(err) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 23 21:07:03 UTC 2024 - 51.2K bytes - Viewed (0) -
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) -
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) -
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) -
pkg/registry/core/service/ipallocator/ipallocator.go
} _, err := a.client.IPAddresses().Create(context.Background(), &ipAddress, metav1.CreateOptions{}) if err != nil { // update metrics a.metrics.incrementAllocationErrors(a.metricLabel, scope) if apierrors.IsAlreadyExists(err) { return ErrAllocated } return err } // update metrics a.metrics.incrementAllocations(a.metricLabel, scope) a.metrics.setAllocated(a.metricLabel, a.Used())
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 31 21:05:04 UTC 2023 - 17K bytes - Viewed (0) -
tests/integration/security/sds_ingress/util/util.go
secret := createSecret(ingressType, credName, ns, ingressCred, isCompoundAndNotGeneric) _, err := c.Kube().CoreV1().Secrets(ns).Create(context.TODO(), secret, metav1.CreateOptions{}) if err != nil { if errors.IsAlreadyExists(err) { if _, err := c.Kube().CoreV1().Secrets(ns).Update(context.TODO(), secret, metav1.UpdateOptions{}); err != nil { return fmt.Errorf("failed to update secret (error: %s)", err) } } else {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Jul 25 05:12:36 UTC 2023 - 20.2K bytes - Viewed (0) -
pkg/controller/deployment/sync.go
createdRS, err := dc.client.AppsV1().ReplicaSets(d.Namespace).Create(ctx, &newRS, metav1.CreateOptions{}) switch { // We may end up hitting this due to a slow cache or a fast resync of the Deployment. case errors.IsAlreadyExists(err): alreadyExists = true // Fetch a copy of the ReplicaSet. rs, rsErr := dc.rsLister.ReplicaSets(newRS.Namespace).Get(newRS.Name) if rsErr != nil { return nil, rsErr }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 05 23:39:52 UTC 2023 - 24.5K bytes - Viewed (0) -
pkg/volume/csi/csi_attacher.go
Attacher: pvSrc.Driver, Source: vaSrc, }, } _, err = c.k8s.StorageV1().VolumeAttachments().Create(context.TODO(), attachment, metav1.CreateOptions{}) if err != nil { if !apierrors.IsAlreadyExists(err) { return "", errors.New(log("attacher.Attach failed: %v", err)) } klog.V(4).Info(log("attachment [%v] for volume [%v] already exists (will not be recreated)", attachID, pvSrc.VolumeHandle)) } else {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 03 07:38:14 UTC 2023 - 25.9K bytes - Viewed (0)