Documentation ¶
Index ¶
- func NewDynamicRESTMapper(cfg *rest.Config) (meta.RESTMapper, error)
- type DynamicRESTMapper
- func (drm *DynamicRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error)
- func (drm *DynamicRESTMapper) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error)
- func (drm *DynamicRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error)
- func (drm *DynamicRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error)
- func (drm *DynamicRESTMapper) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error)
- func (drm *DynamicRESTMapper) ResourceSingularizer(resource string) (singular string, err error)
- func (drm *DynamicRESTMapper) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDynamicRESTMapper ¶
func NewDynamicRESTMapper(cfg *rest.Config) (meta.RESTMapper, error)
NewDynamicRESTMapper returns a RESTMapper that dynamically discovers resource types at runtime. This is in contrast to controller-manager's default RESTMapper, which only checks resource types at startup, and so can't handle the case of first creating a CRD and then creating an instance of that CRD.
Types ¶
type DynamicRESTMapper ¶
type DynamicRESTMapper struct {
// contains filtered or unexported fields
}
DynamicRESTMapper defines dynamic REST mapper entity
func (*DynamicRESTMapper) KindFor ¶
func (drm *DynamicRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error)
KindFor returns the kind by GroupVersionResource
func (*DynamicRESTMapper) KindsFor ¶
func (drm *DynamicRESTMapper) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error)
KindsFor returns kinds by GroupVersionResource
func (*DynamicRESTMapper) RESTMapping ¶
func (drm *DynamicRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error)
RESTMapping returns RESTMapping from kind and versions
func (*DynamicRESTMapper) RESTMappings ¶
func (drm *DynamicRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error)
RESTMappings returns RESTMappings from kind and versions
func (*DynamicRESTMapper) ResourceFor ¶
func (drm *DynamicRESTMapper) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error)
ResourceFor returns resource by GroupVersionResource
func (*DynamicRESTMapper) ResourceSingularizer ¶
func (drm *DynamicRESTMapper) ResourceSingularizer(resource string) (singular string, err error)
ResourceSingularizer returns resource singular
func (*DynamicRESTMapper) ResourcesFor ¶
func (drm *DynamicRESTMapper) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error)
ResourcesFor returns resources by GroupVersionResource