Documentation ¶
Index ¶
- Variables
- func AdmitCreate() kubetesting.ReactionFunc
- func LoadOpenAPISchema() (*openapi_v2.Document, error)
- func NewSimpleDynamicClient(opts ...NewDynamicClientOption) (*clients.DynamicClientSet, *SimpleDiscovery, *SimpleRESTMapper, ...)
- func NewSimpleLogClient(ctx context.Context, objects ...runtime.Object) (*clients.LogClient, *kubefake.Clientset)
- type NewDynamicClientOption
- type SimpleDiscovery
- type SimpleDynamicClient
- type SimpleRESTMapper
- type StubResettableRESTMapper
- func (m *StubResettableRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error)
- func (m *StubResettableRESTMapper) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error)
- func (m *StubResettableRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error)
- func (m *StubResettableRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error)
- func (m *StubResettableRESTMapper) Reset()
- func (m *StubResettableRESTMapper) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error)
- func (m *StubResettableRESTMapper) ResourceSingularizer(resource string) (singular string, err error)
- func (m *StubResettableRESTMapper) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error)
Constants ¶
This section is empty.
Variables ¶
var (
DefaultServerVersion = kubeversion.Info{Major: "1", Minor: "29", GitVersion: "v1.29.2"}
)
Functions ¶
func AdmitCreate ¶
func AdmitCreate() kubetesting.ReactionFunc
func LoadOpenAPISchema ¶
func LoadOpenAPISchema() (*openapi_v2.Document, error)
func NewSimpleDynamicClient ¶
func NewSimpleDynamicClient(opts ...NewDynamicClientOption) (*clients.DynamicClientSet, *SimpleDiscovery, *SimpleRESTMapper, *SimpleDynamicClient)
NewSimpleDynamicClient creates a simple dynamic client for testing purposes, backed by fake discovery client and fake clientset as provided by the client-go library.
Types ¶
type NewDynamicClientOption ¶
type NewDynamicClientOption func(*newDynamicClientOptions)
func WithObjects ¶
func WithObjects(objects ...runtime.Object) NewDynamicClientOption
func WithScheme ¶
func WithScheme(scheme *runtime.Scheme) NewDynamicClientOption
func WithServerVersion ¶
func WithServerVersion(version kubeversion.Info) NewDynamicClientOption
type SimpleDiscovery ¶
type SimpleDiscovery struct {
*discoveryfake.FakeDiscovery
}
SimpleDiscovery provides a fake discovery client with core Kubernetes types.
func NewSimpleDiscovery ¶
func NewSimpleDiscovery(serverVersion kubeversion.Info) *SimpleDiscovery
func (*SimpleDiscovery) Fresh ¶
func (*SimpleDiscovery) Fresh() bool
func (*SimpleDiscovery) Invalidate ¶
func (*SimpleDiscovery) Invalidate()
func (*SimpleDiscovery) OpenAPISchema ¶
func (*SimpleDiscovery) OpenAPISchema() (*openapi_v2.Document, error)
type SimpleDynamicClient ¶
type SimpleDynamicClient struct {
*dynamicfake.FakeDynamicClient
}
func NewSimpleDynamicCLient ¶
func NewSimpleDynamicCLient(scheme *runtime.Scheme, objects ...runtime.Object) *SimpleDynamicClient
NewSimpleDynamicCLient makes a simple dynamic client for testing purposes.
The client is backed by an in-memory object store that may be accessed via the Tracker() method. The given objects are converted to Unstructured objects as necessary and then added to the object store.
type SimpleRESTMapper ¶
type SimpleRESTMapper struct {
meta.RESTMapper
}
func NewSimpleRESTMapper ¶
func NewSimpleRESTMapper(resources []*restmapper.APIGroupResources) *SimpleRESTMapper
NewSimpleRESTMapper creates a simple REST mapper for testing purposes, backed by the provided resource mappings.
Note: Generate resource mappings by calling discovery.GetAPIGroupResources with a working discovery client.
func (*SimpleRESTMapper) Reset ¶
func (m *SimpleRESTMapper) Reset()
type StubResettableRESTMapper ¶
type StubResettableRESTMapper struct { meta.ResettableRESTMapper ResetF func() KindForF func(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) KindsForF func(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error) ResourceForF func(input schema.GroupVersionResource) (schema.GroupVersionResource, error) ResourcesForF func(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error) RESTMappingF func(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error) RESTMappingsF func(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error) ResourceSingularizerF func(resource string) (singular string, err error) }
func (*StubResettableRESTMapper) KindFor ¶
func (m *StubResettableRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error)
func (*StubResettableRESTMapper) KindsFor ¶
func (m *StubResettableRESTMapper) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error)
func (*StubResettableRESTMapper) RESTMapping ¶
func (m *StubResettableRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error)
func (*StubResettableRESTMapper) RESTMappings ¶
func (m *StubResettableRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error)
func (*StubResettableRESTMapper) Reset ¶
func (m *StubResettableRESTMapper) Reset()
func (*StubResettableRESTMapper) ResourceFor ¶
func (m *StubResettableRESTMapper) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error)
func (*StubResettableRESTMapper) ResourceSingularizer ¶
func (m *StubResettableRESTMapper) ResourceSingularizer(resource string) (singular string, err error)
func (*StubResettableRESTMapper) ResourcesFor ¶
func (m *StubResettableRESTMapper) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error)