- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for toUnstructured (0.15 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) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/bench_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 08 21:44:00 UTC 2023 - 8.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/time.go
func (t Time) MarshalCBOR() ([]byte, error) { if t.IsZero() { return cbor.Marshal(nil) } return cbor.Marshal(t.UTC().Format(time.RFC3339)) } // ToUnstructured implements the value.UnstructuredConverter interface. func (t Time) ToUnstructured() interface{} { if t.IsZero() { return nil } buf := make([]byte, 0, len(time.RFC3339)) buf = t.UTC().AppendFormat(buf, time.RFC3339) return string(buf) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:09 UTC 2024 - 5.2K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go
if objectMeta == nil { unstructured.RemoveNestedField(u.UnstructuredContent(), "metadata") return nil } metadata, err := runtime.DefaultUnstructuredConverter.ToUnstructured(objectMeta) if err != nil { return err } u.UnstructuredContent()["metadata"] = metadata return nil } func setObjectMetaUsingAccessors(u, uCopy *unstructured.Unstructured) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:48:03 UTC 2023 - 5K bytes - Viewed (0) -
pilot/pkg/serviceregistry/kube/controller/autoserviceexportcontroller_test.go
{ Type: mcsapi.ServiceExportValid, }, }, }, } _, err := client.Dynamic().Resource(mcs.ServiceExportGVR).Namespace("exportable-ns").Create( context.TODO(), toUnstructured(&export), metav1.CreateOptions{}) if err != nil { t.Fatalf("Unexpected error %v", err) } // create the associated service // no need for assertions, just trying to ensure no errors
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Apr 06 16:02:24 UTC 2023 - 4.9K bytes - Viewed (0)