apiextensions-apiserverk8s.io/apiextensions-apiserver/pkg/crdserverscheme Index | Files

package crdserverscheme

import "k8s.io/apiextensions-apiserver/pkg/crdserverscheme"

Index

Types

type UnstructuredObjectTyper

type UnstructuredObjectTyper struct {
}

UnstructuredObjectTyper provides a runtime.ObjectTyper implementation for runtime.Unstructured object based on discovery information.

func NewUnstructuredObjectTyper

func NewUnstructuredObjectTyper() *UnstructuredObjectTyper

NewUnstructuredObjectTyper returns a runtime.ObjectTyper for unstructured objects based on discovery information. It accepts a list of fallback typers for handling objects that are not runtime.Unstructured. It does not delegate the Recognizes check, only ObjectKinds. TODO this only works for the apiextensions server and doesn't recognize any types. Move to point of use.

func (*UnstructuredObjectTyper) ObjectKinds

func (d *UnstructuredObjectTyper) ObjectKinds(obj runtime.Object) (gvks []schema.GroupVersionKind, unversionedType bool, err error)

ObjectKinds returns a slice of one element with the group,version,kind of the provided object, or an error if the object is not runtime.Unstructured or has no group,version,kind information. unversionedType will always be false because runtime.Unstructured object should always have group,version,kind information set.

func (*UnstructuredObjectTyper) Recognizes

Recognizes returns true if the provided group,version,kind was in the discovery information.

Source Files

unstructured.go

Version
v0.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
3 hours ago

Tools for package owners.