- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 240 for unstructured (0.28 sec)
-
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) -
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) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.go
into: &unstructured.Unstructured{}, expectedGVK: &schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Foo"}, expectedObject: &unstructured.Unstructured{Object: map[string]interface{}{"apiVersion": "/v1", "kind": "Foo"}}, }, { data: []byte(`{"apiVersion":"/v1","kind":"Foo"}`), typer: &mockTyper{gvk: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}}, into: &unstructured.Unstructured{},
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 04 15:55:02 UTC 2024 - 40K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor_test.go
} }, }, { name: "into unstructured", data: []byte("\xa2\x6aapiVersion\x61v\x64kind\x61k"), into: &unstructured.Unstructured{}, expectedObj: &unstructured.Unstructured{Object: map[string]interface{}{ "apiVersion": "v", "kind": "k", }}, expectedGVK: &schema.GroupVersionKind{Version: "v", Kind: "k"}, assertOnError: func(t *testing.T, err error) { if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 13 14:57:12 UTC 2024 - 20.1K bytes - Viewed (0) -
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], informer *testInformer, waitForReconcile func(runtime.Object) error,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 12 18:58:24 UTC 2024 - 16.1K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/metrics_test.go
} testCases := []struct { desc string obj *unstructured.Unstructured old *unstructured.Unstructured schema apiextensions.JSONSchemaProps iters int // how many times to validate the same update before checking metric want string }{ { desc: "valid noop update", obj: &unstructured.Unstructured{ Object: map[string]interface{}{ "foo": "bar", }, },
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 10.9K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/validator.go
if scale == nil { return nil } var allErrs field.ErrorList // validate specReplicas specReplicasPath := strings.TrimPrefix(scale.SpecReplicasPath, ".") // ignore leading period
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 08 14:00:05 UTC 2024 - 7.4K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/etcd_test.go
} } func setSpecReplicas(u *unstructured.Unstructured, replicas int64) { setNestedField(u, replicas, "spec", "replicas") } func getSpecReplicas(u *unstructured.Unstructured) int64 { val, found, err := unstructured.NestedInt64(u.Object, "spec", "replicas") if !found || err != nil { return 0 } return val } func setStatusReplicas(u *unstructured.Unstructured, replicas int64) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 28 19:06:46 UTC 2024 - 25.2K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/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))} }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 28 21:22:34 UTC 2024 - 14.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor.go
} } apiVersion, _ := content["apiVersion"].(string) kind, _ := content["kind"].(string) kind = strings.TrimSuffix(kind, "List") var unstructureds []unstructured.Unstructured if len(items) > 0 { unstructureds = make([]unstructured.Unstructured, len(items)) } for i := range items { object, cast := items[i].(map[string]interface{}) if !cast {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 13 14:57:12 UTC 2024 - 9.6K bytes - Viewed (0)