Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 508 for unstructured (0.17 sec)

  1. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go

    // +k8s:deepcopy-gen=true
    type Unstructured struct {
    	// Object is a JSON compatible map with string, float, int, bool, []interface{}, or
    	// map[string]interface{}
    	// children.
    	Object map[string]interface{}
    }
    
    var _ metav1.Object = &Unstructured{}
    var _ runtime.Unstructured = &Unstructured{}
    var _ metav1.ListInterface = &Unstructured{}
    
    func (obj *Unstructured) GetObjectKind() schema.ObjectKind { return obj }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun May 28 03:26:35 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/crdserverscheme/unstructured.go

    // runtime.Unstructured object based on discovery information.
    type UnstructuredObjectTyper struct {
    }
    
    // NewUnstructuredObjectTyper returns a runtime.ObjectTyper for
    // unstructured objects based on discovery information. It accepts a list of fallback typers
    // for handling objects that are not runtime.Unstructured. It does not delegate the Recognizes
    // check, only ObjectKinds.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 06 18:08:14 UTC 2018
    - 2.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_conversion_test.go

    	// eventually, we don't want any inter-unstructured conversion happen, but for now, the conversion
    	// just copy/pastes
    	scheme, _ := test.TestScheme()
    	inUnstructured := &unstructured.Unstructured{
    		Object: map[string]interface{}{
    			"apiVersion": "v1",
    			"kind":       "Carp",
    		},
    	}
    	outUnstructured := &unstructured.Unstructured{}
    	err := scheme.Convert(inUnstructured, outUnstructured, nil)
    	assert.NoError(t, err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 07 15:19:26 UTC 2020
    - 16.4K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/bench_test.go

    						b.Fatal(err)
    					}
    					f.Reset()
    				}
    			})
    		})
    	}
    }
    
    func toUnstructured(b *testing.B, o runtime.Object) *unstructured.Unstructured {
    	u, err := runtime.DefaultUnstructuredConverter.ToUnstructured(o)
    	if err != nil {
    		b.Fatalf("Failed to unmarshal to json: %v", err)
    	}
    	return &unstructured.Unstructured{Object: u}
    }
    
    func BenchmarkConvertObjectToTyped(b *testing.B) {
    	tests := []struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go

    // TestUnstructuredMetadataRoundTrip checks that metadata accessors
    // correctly set the metadata for unstructured objects.
    // First, it fuzzes an empty ObjectMeta and sets this value as the metadata for an unstructured object.
    // Next, it uses metadata accessor methods to set these fuzzed values to another unstructured object.
    // Finally, it checks that both the unstructured objects are equal.
    func TestUnstructuredMetadataRoundTrip(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 5K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/status_strategy_test.go

    			obj: &unstructured.Unstructured{
    				Object: map[string]interface{}{
    					"new": "new",
    				},
    			},
    			expected: &unstructured.Unstructured{
    				Object: map[string]interface{}{
    					"spec": "old",
    				},
    			},
    		},
    		{
    			// delete status
    			old: &unstructured.Unstructured{
    				Object: map[string]interface{}{
    					"spec":   "old",
    					"status": "old",
    				},
    			},
    			obj: &unstructured.Unstructured{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 18 22:16:10 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/status_strategy.go

    	uNew, ok := obj.(*unstructured.Unstructured)
    	if !ok {
    		return field.ErrorList{field.Invalid(field.NewPath(""), obj, fmt.Sprintf("has type %T. Must be a pointer to an Unstructured type", obj))}
    	}
    	uOld, ok := old.(*unstructured.Unstructured)
    	if !ok {
    		return field.ErrorList{field.Invalid(field.NewPath(""), old, fmt.Sprintf("has type %T. Must be a pointer to an Unstructured type", old))}
    	}
    
    	var errs field.ErrorList
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 18 22:16:10 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  8. pkg/api/testing/unstructured_test.go

    				if !apiequality.Semantic.DeepEqual(uJSON, uCBOR) {
    					t.Fatalf("unstructured via json differed from unstructured via cbor: %v", cmp.Diff(uJSON, uCBOR))
    				}
    
    				// original->JSON/CBOR->Unstructured == original->JSON/CBOR->Unstructured->JSON->Unstructured
    				buf.Reset()
    				if err := jsonSerializer.Encode(uJSON, &buf); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy_test.go

    	tcs := []struct {
    		name          string
    		old           *unstructured.Unstructured
    		obj           *unstructured.Unstructured
    		statusEnabled bool
    		expected      *unstructured.Unstructured
    	}{
    		{
    			name:          "/status is enabled, spec changes increment generation",
    			statusEnabled: true,
    			old: &unstructured.Unstructured{
    				Object: map[string]interface{}{
    					"metadata": generation1(),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  10. operator/pkg/cache/cache_test.go

    			in: map[string]*ObjectCache{
    				"cache-foo-key": {
    					Cache: map[string]*object.K8sObject{
    						"obj-foo-key": object.NewK8sObject(&unstructured.Unstructured{
    							Object: make(map[string]any),
    						}, nil, nil),
    						"dont-touch-me-key": object.NewK8sObject(&unstructured.Unstructured{
    							Object: make(map[string]any),
    						}, nil, nil),
    					},
    					Mu: &sync.RWMutex{},
    				},
    			},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 20 18:46:12 UTC 2023
    - 5.3K bytes
    - Viewed (0)
Back to top