Documentation ¶
Index ¶
- Variables
- func AddConverters(scheme *runtime.Scheme) error
- func AssertTrackingConfig(namespace, name string) func(*testing.T, *rtesting.TableRow)
- func AssertTrackingObject(gvk schema.GroupVersionKind, namespace, name string) func(*testing.T, *rtesting.TableRow)
- func AssertTrackingRevision(namespace, name string) func(*testing.T, *rtesting.TableRow)
- func MakeFactory(ctor Ctor) rtesting.Factory
- func NewScheme() *runtime.Scheme
- func ParseYAML(yamls io.Reader) ([]unstructured.Unstructured, error)
- func ToKnownObjects(objs []runtime.Object) []runtime.Object
- func ToUnstructured(t *testing.T, sch *runtime.Scheme, objs []runtime.Object) (us []runtime.Object)
- type Ctor
- type Listers
- func (l *Listers) GetAPIExtentionsObjects() []runtime.Object
- func (l *Listers) GetClusterDuckTypeLister() discoverylister.ClusterDuckTypeLister
- func (l *Listers) GetCustomResourceDefinitionLister() kubev1lister.CustomResourceDefinitionLister
- func (l *Listers) GetDiscoveryObjects() []runtime.Object
- func (l *Listers) GetKubeObjects() []runtime.Object
- func (l *Listers) IndexerFor(obj runtime.Object) cache.Indexer
- func (*Listers) NewScheme() *runtime.Scheme
Constants ¶
This section is empty.
Variables ¶
var TrackerKey key = struct{}{}
TrackerKey is used to looking a FakeTracker in a context.Context
Functions ¶
func AddConverters ¶
func AssertTrackingConfig ¶
AssertTrackingConfig will ensure the provided Configuration is being tracked
func AssertTrackingObject ¶
func AssertTrackingObject(gvk schema.GroupVersionKind, namespace, name string) func(*testing.T, *rtesting.TableRow)
AssertTrackingObject will ensure the following objects are being tracked
func AssertTrackingRevision ¶
AssertTrackingRevision will ensure the provided Revision is being tracked
func MakeFactory ¶
MakeFactory creates a reconciler factory with fake clients and controller created by `ctor`.
func ParseYAML ¶
func ParseYAML(yamls io.Reader) ([]unstructured.Unstructured, error)
func ToUnstructured ¶
ToUnstructured takes a list of k8s resources and converts them to Unstructured objects. We must pass objects as Unstructured to the dynamic client fake, or it won't handle them properly.
Types ¶
type Ctor ¶
type Ctor func(context.Context, *Listers, configmap.Watcher) controller.Reconciler
Ctor functions create a k8s controller with given params.
type Listers ¶
type Listers struct {
// contains filtered or unexported fields
}
func NewListers ¶
func (*Listers) GetAPIExtentionsObjects ¶
func (*Listers) GetClusterDuckTypeLister ¶
func (l *Listers) GetClusterDuckTypeLister() discoverylister.ClusterDuckTypeLister
func (*Listers) GetCustomResourceDefinitionLister ¶
func (l *Listers) GetCustomResourceDefinitionLister() kubev1lister.CustomResourceDefinitionLister
func (*Listers) GetDiscoveryObjects ¶
func (*Listers) GetKubeObjects ¶
func (*Listers) IndexerFor ¶
IndexerFor returns the indexer for the given object.