- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for toUnstructured (0.17 sec)
-
pkg/api/testing/unstructured_test.go
t.Errorf("Object changed during JSON operations, diff: %v", cmp.Diff(item, unmarshalledObj)) return } newUnstr, err := runtime.DefaultUnstructuredConverter.ToUnstructured(item) if err != nil { t.Errorf("ToUnstructured failed: %v", err) return } newObj := reflect.New(reflect.TypeOf(item).Elem()).Interface().(runtime.Object)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:10 UTC 2024 - 16.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/converter.go
return nil, fmt.Errorf("ToUnstructured requires a non-nil pointer to an object, got %v", t) } u = map[string]interface{}{} err = toUnstructured(value.Elem(), reflect.ValueOf(&u).Elem()) } if c.mismatchDetection { newUnstr := map[string]interface{}{} newErr := toUnstructuredViaJSON(obj, &newUnstr) if (err != nil) != (newErr != nil) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 11 16:02:13 UTC 2023 - 24.9K bytes - Viewed (0) -
pilot/pkg/serviceregistry/kube/controller/serviceimportcache_test.go
Namespace: serviceImportNamespace, }, Spec: mcsapi.ServiceImportSpec{ Type: importType, IPs: vips, }, } return toUnstructured(si) } func toUnstructured(o any) *unstructured.Unstructured { u, err := runtime.DefaultUnstructuredConverter.ToUnstructured(o) if err != nil { panic(err) } return &unstructured.Unstructured{Object: u}
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Aug 14 18:50:38 UTC 2023 - 15.2K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/converter_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 11 16:02:13 UTC 2023 - 22.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/dispatcher.go
return errors.New("UnmarshalJSON unimplemented for wrappedParam") } func (w *wrappedParam) ToUnstructured() interface{} { res, err := runtime.DefaultUnstructuredConverter.ToUnstructured(w.nested) if err != nil { return nil } metaRes, err := runtime.DefaultUnstructuredConverter.ToUnstructured(&w.TypeMeta) if err != nil { return nil } for k, v := range metaRes { res[k] = v }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 14.4K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/objectmeta/coerce_test.go
} } N := 100 for i := 0; i < N; i++ { fuzzedObjectMeta := &metav1.ObjectMeta{} fuzzer.Fuzz(fuzzedObjectMeta) goodMetaMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(fuzzedObjectMeta.DeepCopy()) if err != nil { t.Fatal(err) } for _, pth := range jsonPaths(nil, goodMetaMap) { for _, v := range spuriousValues() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:48:03 UTC 2023 - 12.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_conversion_test.go
} func BenchmarkToUnstructured(b *testing.B) { carp := benchmarkCarp() converter := runtime.DefaultUnstructuredConverter b.ResetTimer() for i := 0; i < b.N; i++ { result, err := converter.ToUnstructured(carp) if err != nil { b.Fatalf("Unexpected conversion error: %v", err) } if len(result) != 3 { b.Errorf("Unexpected conversion result: %#v", result) } } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Apr 07 15:19:26 UTC 2020 - 16.4K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go
return } newReferences := make([]interface{}, 0, len(references)) for _, reference := range references { out, err := runtime.DefaultUnstructuredConverter.ToUnstructured(&reference) if err != nil { utilruntime.HandleError(fmt.Errorf("unable to convert Owner Reference: %v", err)) continue } newReferences = append(newReferences, out) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun May 28 03:26:35 UTC 2023 - 13.7K bytes - Viewed (0) -
tests/integration/pilot/mcs/discoverability/discoverability_test.go
serviceImportGVR := common.KubeSettings(t).ServiceImportGVR() serviceExport := newServiceExport(service, serviceExportGVR) u, err := runtime.DefaultUnstructuredConverter.ToUnstructured(serviceExport) if err != nil { t.Fatal(err) } // Create the ServiceExports in each cluster concurrently. g := errgroup.Group{} for _, c := range exportClusters { c := c
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 08 22:02:59 UTC 2024 - 17.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/filter.go
if obj == nil || reflect.ValueOf(obj).IsNil() { return &unstructured.Unstructured{Object: nil}, nil } ret, err := runtime.DefaultUnstructuredConverter.ToUnstructured(obj) if err != nil { return nil, err } return &unstructured.Unstructured{Object: ret}, nil } func objectToResolveVal(r runtime.Object) (interface{}, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 24 14:46:11 UTC 2023 - 12.1K bytes - Viewed (0)