Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 27 for UnstructuredList (0.46 sec)

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

    func (c *nopConverter) Convert(in runtime.Object, targetGV schema.GroupVersion) (runtime.Object, error) {
    	// Run the converter on the list items instead of list itself
    	if list, ok := in.(*unstructured.UnstructuredList); ok {
    		for i := range list.Items {
    			list.Items[i].SetGroupVersionKind(targetGV.WithKind(list.Items[i].GroupVersionKind().Kind))
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 13 15:27:39 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  2. pkg/controller/namespace/deletion/namespaced_resources_deleter.go

    	if len(unstructuredList.Items) == 0 {
    		// we're done
    		return gvrDeletionMetadata{finalizerEstimateSeconds: 0, numRemaining: 0}, nil
    	}
    
    	// use the list to find the finalizers
    	finalizersToNumRemaining := map[string]int{}
    	for _, item := range unstructuredList.Items {
    		for _, finalizer := range item.GetFinalizers() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 20 07:34:23 UTC 2023
    - 25.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor.go

    	if u, ok := into.(runtime.Unstructured); ok {
    		var content map[string]interface{}
    		defer func() {
    			switch u := u.(type) {
    			case *unstructured.UnstructuredList:
    				// UnstructuredList's implementation of SetUnstructuredContent
    				// produces different objects than those produced by a decode using
    				// UnstructuredJSONScheme:
    				//
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 13 14:57:12 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/crd_finalizer.go

    		listObj, err := crClient.List(ctx, nil)
    		if err != nil {
    			return false, err
    		}
    		if len(listObj.(*unstructured.UnstructuredList).Items) == 0 {
    			return true, nil
    		}
    		klog.V(2).Infof("%s.%s waiting for %d items to be removed", crd.Status.AcceptedNames.Plural, crd.Spec.Group, len(listObj.(*unstructured.UnstructuredList).Items))
    		return false, nil
    	})
    	if err != nil {
    		return apiextensionsv1.CustomResourceDefinitionCondition{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go

    	if !ok {
    		return false
    	}
    	_, ok = field.([]interface{})
    	return ok
    }
    func (obj *Unstructured) ToList() (*UnstructuredList, error) {
    	if !obj.IsList() {
    		// return an empty list back
    		return &UnstructuredList{Object: obj.Object}, nil
    	}
    
    	ret := &UnstructuredList{}
    	ret.Object = obj.Object
    
    	err := obj.EachListItem(func(item runtime.Object) error {
    		castItem := item.(*Unstructured)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun May 28 03:26:35 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  6. operator/cmd/mesh/uninstall.go

    // 2. lists to be pruned resources if user uninstall by --revision flag.
    func preCheckWarnings(cmd *cobra.Command, kubeClient kube.CLIClient, uiArgs *uninstallArgs, istioNamespace,
    	rev string, resourcesList []*unstructured.UnstructuredList, objectsList object.K8sObjects, l *clog.ConsoleLogger, dryRun bool,
    ) {
    	pids, err := proxyinfo.GetIDsFromProxyInfo(kubeClient, istioNamespace)
    	needConfirmation, message := false, ""
    	if uiArgs.purge {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Mar 15 01:18:49 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top