- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for GetObjectKind (0.44 sec)
-
pkg/config/schema/kubetypes/common.go
} panic("unknown kind: " + cfg.String()) } func GvkFromObject(obj runtime.Object) config.GroupVersionKind { if gvk, ok := getGvk(obj); ok { return gvk } panic("unknown kind: " + obj.GetObjectKind().GroupVersionKind().String()) } var registeredTypes = typemap.NewTypeMap() func Register[T runtime.Object](reg RegisterType[T]) { typemap.Set[RegisterType[T]](registeredTypes, reg) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 16:38:40 UTC 2024 - 2.2K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor.go
// lax mode for decoding into TypeMeta. if err := modes.DecodeLax.Unmarshal(data, &tm); err != nil { return nil, fmt.Errorf("unable to determine group/version/kind: %w", err) } actual := tm.GetObjectKind().GroupVersionKind() return &actual, nil } type Serializer interface { runtime.Serializer recognizer.RecognizingDecoder } var _ Serializer = &serializer{} type options struct {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 13 14:57:12 UTC 2024 - 9.6K bytes - Viewed (0) -
pkg/kube/controllers/common.go
} return found, nil } // ObjectToGVR extracts the GVR of an unstructured resource. This is useful when using dynamic // clients. func ObjectToGVR(u Object) (schema.GroupVersionResource, error) { g := u.GetObjectKind().GroupVersionKind() gk := config.GroupVersionKind{ Group: g.Group, Version: g.Version, Kind: g.Kind, } found, ok := gvk.ToGVR(gk) if !ok {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Apr 11 08:27:29 UTC 2024 - 8.9K bytes - Viewed (0) -
operator/pkg/verifier/verifier.go
return nil }) return crdCount, istioDeploymentCount, daemonSetCount, err } func resourceKinds(un *unstructured.Unstructured) string { kinds := findResourceInSpec(un.GetObjectKind().GroupVersionKind()) if kinds == "" { kinds = strings.ToLower(un.GetKind()) + "s" } // Override with special kind if it exists in the map if specialKind, exists := specialKinds[un.GetKind()]; exists {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 14 19:23:44 UTC 2024 - 15K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor_test.go
return w.n, w.err } // anyObject wraps arbitrary concrete values to be encoded or decoded. type anyObject struct { Value interface{} } func (p anyObject) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } func (anyObject) DeepCopyObject() runtime.Object { panic("unimplemented") } func (p anyObject) MarshalCBOR() ([]byte, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 13 14:57:12 UTC 2024 - 20.1K bytes - Viewed (0) -
pkg/api/testing/unstructured_test.go
t.Fatalf("conversion for %v failed: %v", gvk.Kind, err) } // Decoding into Unstructured requires that apiVersion and kind be // serialized, so populate TypeMeta. item.GetObjectKind().SetGroupVersionKind(gvk) jsonSerializer := jsonserializer.NewSerializerWithOptions(jsonserializer.DefaultMetaFactory, legacyscheme.Scheme, legacyscheme.Scheme, jsonserializer.SerializerOptions{})
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:10 UTC 2024 - 16.9K bytes - Viewed (0) -
pkg/kube/util.go
// As the name implies, it is not efficient. func SlowConvertToRuntimeObject(in *crd.IstioKind) (runtime.Object, error) { by, err := config.ToJSON(in) if err != nil { return nil, err } gvk := in.GetObjectKind().GroupVersionKind() obj, _, err := IstioCodec.UniversalDeserializer().Decode(by, &gvk, nil) if err != nil { return nil, err } return obj, nil }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 06 05:10:23 UTC 2024 - 18.6K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.go
type staticTextMarshaler int func (staticTextMarshaler) MarshalText() ([]byte, error) { return []byte("static"), nil } type testEncodableMap[K comparable] map[K]interface{} func (testEncodableMap[K]) GetObjectKind() schema.ObjectKind { panic("unimplemented") } func (testEncodableMap[K]) DeepCopyObject() runtime.Object { panic("unimplemented") } func TestEncode(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 04 15:55:02 UTC 2024 - 40K bytes - Viewed (0)