- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for GetObjectKind (0.74 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/apiserver/pkg/registry/rest/delete_test.go
gvk := obj.GetObjectKind().GroupVersionKind() if len(gvk.Kind) == 0 { return nil, false, runtime.NewMissingKindErr("object has no kind field ") } if len(gvk.Version) == 0 { return nil, false, runtime.NewMissingVersionErr("object has no apiVersion field") } return []schema.GroupVersionKind{obj.GetObjectKind().GroupVersionKind()}, false, nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 24 11:44:07 UTC 2024 - 9.3K 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) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/dispatcher.go
namespace, err = c.matcher.GetNamespace(namespaceName) if err != nil { return err } } for _, param := range params { var p runtime.Object = param if p != nil && p.GetObjectKind().GroupVersionKind().Empty() { // Make sure param has TypeMeta populated // This is a simple hack to make sure typeMeta is // available to CEL without making copies of objects, etc. p = &wrappedParam{
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/conversion/converter.go
// the individual items. This function assumes it never gets a v1.List. func (c *crConverter) ConvertToVersion(in runtime.Object, target runtime.GroupVersioner) (runtime.Object, error) { fromGVK := in.GetObjectKind().GroupVersionKind() toGVK, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{fromGVK}) if !ok { // TODO: should this be a typed error?
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 28 19:06:46 UTC 2024 - 9.5K 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) -
pkg/api/testing/defaulting_test.go
// at worst, we will timeout } iter++ src, err := scheme.New(gvk) if err != nil { t.Fatal(err) } f.Fuzz(src) src.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{}) original := src.DeepCopyObject() // get internal withDefaults := src.DeepCopyObject() scheme.Default(withDefaults.(runtime.Object))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 20.3K 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) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_test_context.go
), admission.NewObjectInterfacesFromScheme(p.scheme)) } func (p *PolicyTestContext[P, B, E]) inferGVK(object runtime.Object) (schema.GroupVersionKind, schema.GroupVersionResource, error) { objectGVK := object.GetObjectKind().GroupVersionKind() if objectGVK.Empty() { // If the object doesn't have a GVK, ask the schema for preferred GVK knownKinds, _, err := p.scheme.ObjectKinds(object) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 19K bytes - Viewed (0)