Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for CreateOrUpdate (0.27 sec)

  1. pkg/kube/kclient/clienttest/test_helpers.go

    	}
    	return res
    }
    
    func (t TestWriter[T]) CreateOrUpdate(object T) T {
    	t.t.Helper()
    	res, err := kclient.CreateOrUpdate[T](t.c, object)
    	if err != nil {
    		t.t.Fatalf("createOrUpdate %v/%v: %v", object.GetNamespace(), object.GetName(), err)
    	}
    	return res
    }
    
    func (t TestWriter[T]) CreateOrUpdateStatus(object T) T {
    	t.t.Helper()
    	_, err := kclient.CreateOrUpdate(t.c, object)
    	if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 23 19:18:21 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  2. pkg/revisions/default_watcher_test.go

    	client.RunAndWait(stop)
    	go w.Run(stop)
    	whc := clienttest.Wrap(t, w.webhooks)
    	expectRevision(t, w, "")
    	// change default to "red"
    	whc.CreateOrUpdate(webhook("red"))
    	expectRevision(t, w, "red")
    
    	// change default to "green"
    	whc.CreateOrUpdate(webhook("green"))
    	expectRevision(t, w, "green")
    
    	// remove default
    	whc.Delete(defaultTagWebhookName, "")
    	expectRevision(t, w, "")
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 23 17:46:59 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  3. pkg/registry/core/rangeallocation/registry.go

    	// or an error if the allocation could not be retrieved.
    	Get() (*api.RangeAllocation, error)
    	// CreateOrUpdate should create or update the provide allocation, unless a conflict
    	// has occurred since the item was last created.
    	CreateOrUpdate(*api.RangeAllocation) error
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 09 11:14:08 UTC 2017
    - 1.1K bytes
    - Viewed (0)
  4. pilot/pkg/serviceregistry/kube/controller/network_test.go

    			IP:    "2.3.4.6",
    			Ports: []corev1.PortStatus{{Port: 15443, Protocol: corev1.ProtocolTCP}},
    		}}}},
    	}
    	clienttest.Wrap(t, c.services).CreateOrUpdate(svc)
    }
    
    func removeLabeledServiceGateway(t *testing.T, c *FakeController) {
    	clienttest.Wrap(t, c.services).Delete("istio-labeled-gw", "arbitrary-ns")
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 18 19:09:43 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  5. pkg/registry/core/service/allocator/storage/storage.go

    		return nil, storeerr.InterpretGetError(err, e.resource, "")
    	}
    	return existing, nil
    }
    
    // CreateOrUpdate attempts to update the current etcd state with the provided
    // allocation.
    func (e *Etcd) CreateOrUpdate(snapshot *api.RangeAllocation) error {
    	e.lock.Lock()
    	defer e.lock.Unlock()
    
    	last := ""
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  6. pkg/kube/kclient/helpers.go

    // limitations under the License.
    
    package kclient
    
    import (
    	kerrors "k8s.io/apimachinery/pkg/api/errors"
    
    	"istio.io/istio/pkg/kube/controllers"
    )
    
    func CreateOrUpdate[T controllers.Object](c Writer[T], object T) (T, error) {
    	res, err := c.Create(object)
    	if kerrors.IsAlreadyExists(err) {
    		// Already exist, update
    		return c.Update(object)
    	}
    	return res, err
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 06 16:02:24 UTC 2023
    - 919 bytes
    - Viewed (0)
  7. cmd/kubeadm/app/discovery/token/token_test.go

    			}
    
    			// Create a fake client and create the cluster-info ConfigMap
    			client := fakeclient.NewSimpleClientset()
    			if err = test.configMap.createOrUpdate(client); err != nil {
    				t.Fatalf("could not create ConfigMap: %v", err)
    			}
    
    			// Set arbitrary discovery timeout and retry interval
    			timeout := time.Millisecond * 500
    			interval := time.Millisecond * 20
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 14 13:07:56 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  8. pilot/pkg/config/kube/gateway/gatewayclass_test.go

    		gc := &gateway.GatewayClass{
    			ObjectMeta: metav1.ObjectMeta{
    				Name: name,
    			},
    			Spec: gateway.GatewayClassSpec{
    				ControllerName: gateway.GatewayController(controller),
    			},
    		}
    		classes.CreateOrUpdate(gc)
    	}
    	deleteClass := func(name string) {
    		classes.Delete(name, "")
    	}
    	expectClass := func(name, controller string) {
    		t.Helper()
    		retry.UntilSuccessOrFail(t, func() error {
    			gc := classes.Get(name, "")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 06 08:41:13 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. pilot/pkg/xds/workload_test.go

    		ObjectMeta: metav1.ObjectMeta{
    			Name:      name,
    			Namespace: ns,
    		},
    		Spec: *spec, //nolint: govet
    	}
    	clienttest.NewWriter[*securityclient.PeerAuthentication](s.T(), s.KubeClient()).CreateOrUpdate(c)
    }
    
    func deleteRBAC(s *xds.FakeDiscoveryServer, name string, ns string) {
    	clienttest.NewWriter[*securityclient.AuthorizationPolicy](s.T(), s.KubeClient()).Delete(name, ns)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 18 19:09:43 UTC 2024
    - 15.9K bytes
    - Viewed (0)
  10. pilot/pkg/serviceregistry/kube/controller/ambient/ambientindex_test.go

    			modify(pol)
    		}
    		s.authz.CreateOrUpdate(pol)
    	case gvk.PeerAuthentication:
    		pol := &clientsecurityv1beta1.PeerAuthentication{
    			ObjectMeta: metav1.ObjectMeta{
    				Name:      name,
    				Namespace: ns,
    			},
    			Spec: auth.PeerAuthentication{
    				Selector: sel,
    			},
    		}
    		if modify != nil {
    			modify(pol)
    		}
    		s.pa.CreateOrUpdate(pol)
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 08 01:04:50 UTC 2024
    - 70.2K bytes
    - Viewed (0)
Back to top