Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 32 for UnstructuredList (0.52 sec)

  1. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/webhook_converter.go

    func getObjectsToConvert(obj runtime.Object, apiVersion string) []runtime.RawExtension {
    	listObj, isList := obj.(*unstructured.UnstructuredList)
    	var objects []runtime.RawExtension
    	if isList {
    		for i := range listObj.Items {
    			// Only sent item for conversion, if the apiVersion is different
    			if listObj.Items[i].GetAPIVersion() != apiVersion {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 07 19:37:55 UTC 2023
    - 20.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go

    	// For unstructured lists with a target group/version, preserve the group/version in the instantiated list items
    	if unstructuredList, isUnstructured := listObj.(*unstructured.UnstructuredList); isUnstructured {
    		if apiVersion := unstructuredList.GetAPIVersion(); len(apiVersion) > 0 {
    			return func() runtime.Object {
    				return &unstructured.Unstructured{Object: map[string]interface{}{"apiVersion": apiVersion}}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 11:56:42 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/test/api_meta_help_test.go

    	for i := range list {
    		if e, a := list[i], pl.Items[i]; e != a {
    			t.Fatalf("%d: unmatched: %s", i, cmp.Diff(e, a))
    		}
    	}
    }
    
    func TestSetListToMatchingType(t *testing.T) {
    	pl := &unstructured.UnstructuredList{}
    	list := []runtime.Object{
    		&unstructured.Unstructured{Object: map[string]interface{}{"foo": 1}},
    		&unstructured.Unstructured{Object: map[string]interface{}{"foo": 2}},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/runtime/converter_test.go

    	}
    }
    
    func TestRoundTrip(t *testing.T) {
    	intVal := int64(42)
    	testCases := []struct {
    		obj interface{}
    	}{
    		{
    			obj: &unstructured.UnstructuredList{
    				Object: map[string]interface{}{
    					"kind": "List",
    				},
    				// Not testing a list with nil Items because items is a non-optional field and hence
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 16:02:13 UTC 2023
    - 22.9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go

    		// because the top-level type matches our desired destination type. actually send the object to the converter
    		// to give it a chance to convert the list items if needed.
    		if _, ok := obj.(*unstructured.UnstructuredList); !ok {
    			// avoid conversion roundtrip if GVK is the right one already or is empty (yes, this is a hack, but the old behaviour we rely on in kubectl)
    			objGVK := obj.GetObjectKind().GroupVersionKind()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 03 06:51:04 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/etcd.go

    			ret.SetGroupVersionKind(kind)
    			return ret
    		},
    		NewListFunc: func() runtime.Object {
    			// lists are never stored, only manufactured, so stomp in the right kind
    			ret := &unstructured.UnstructuredList{}
    			ret.SetGroupVersionKind(listKind)
    			return ret
    		},
    		PredicateFunc:             strategy.MatchCustomResourceDefinitionStorage,
    		DefaultQualifiedResource:  resource,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 12.4K bytes
    - Viewed (0)
  7. operator/cmd/mesh/manifest_shared_test.go

    func getAllIstioObjects() object.K8sObjects {
    	var out object.K8sObjects
    	for _, gvk := range append(allClusterGVKs, allNamespacedGVKs...) {
    		objects := &unstructured.UnstructuredList{}
    		objects.SetGroupVersionKind(gvk)
    		if err := testClient.List(context.TODO(), objects); err != nil {
    			log.Error(err.Error())
    			continue
    		}
    		for _, o := range objects.Items {
    			no := o.DeepCopy()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Feb 20 22:39:28 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_test.go

    		if list, err := crdInfo.storages[version.Name].CustomResource.List(ctx, &metainternalversion.ListOptions{}); err != nil {
    			t.Fatal(err)
    		} else {
    			for _, item := range list.(*unstructured.UnstructuredList).Items {
    				if item.GroupVersionKind() != expectGVK {
    					t.Errorf("expected list item to be %#v, got %#v", expectGVK, item.GroupVersionKind())
    				}
    			}
    		}
    
    		if enableWatchCache {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 13 15:27:39 UTC 2023
    - 34.6K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/internal/generic/controller_test.go

    )
    
    func init() {
    	scheme.AddKnownTypeWithName(fakeGVK, &unstructured.Unstructured{})
    	scheme.AddKnownTypeWithName(fakeGVKList, &unstructured.UnstructuredList{})
    }
    
    func setupTest(ctx context.Context, customReconciler func(string, string, runtime.Object) error) (
    	tracker clienttesting.ObjectTracker,
    	controller generic.Controller[*unstructured.Unstructured],
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 12 18:58:24 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_test_context.go

    			}
    			scheme.AddKnownTypeWithName(mapping.GroupVersionKind, &unstructured.Unstructured{})
    			scheme.AddKnownTypeWithName(mapping.GroupVersionKind.GroupVersion().WithKind(mapping.GroupVersionKind.Kind+"List"), &unstructured.UnstructuredList{})
    		}
    
    		return scheme, nil
    	}()
    	if err != nil {
    		return nil, nil, err
    	}
    
    	fakeRestMapper := func() *meta.DefaultRESTMapper {
    		res := meta.NewDefaultRESTMapper([]schema.GroupVersion{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 19K bytes
    - Viewed (0)
Back to top