v1alpha1

package
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2021 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TrackerKey key = struct{}{}

TrackerKey is used to looking a FakeTracker in a context.Context

Functions

func AddConverters

func AddConverters(scheme *runtime.Scheme) error

func AssertTrackingConfig

func AssertTrackingConfig(namespace, name string) func(*testing.T, *rtesting.TableRow)

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

func AssertTrackingRevision(namespace, name string) func(*testing.T, *rtesting.TableRow)

AssertTrackingRevision will ensure the provided Revision is being tracked

func MakeFactory

func MakeFactory(ctor Ctor) rtesting.Factory

MakeFactory creates a reconciler factory with fake clients and controller created by `ctor`.

func NewScheme

func NewScheme() *runtime.Scheme

func ParseYAML

func ParseYAML(yamls io.Reader) ([]unstructured.Unstructured, error)

func ToKnownObjects

func ToKnownObjects(objs []runtime.Object) []runtime.Object

func ToUnstructured

func ToUnstructured(t *testing.T, sch *runtime.Scheme, objs []runtime.Object) (us []runtime.Object)

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

Ctor functions create a k8s controller with given params.

type Listers

type Listers struct {
	// contains filtered or unexported fields
}

func NewListers

func NewListers(objs []runtime.Object) Listers

func (*Listers) GetAPIExtentionsObjects

func (l *Listers) GetAPIExtentionsObjects() []runtime.Object

func (*Listers) GetClusterDuckTypeLister

func (l *Listers) GetClusterDuckTypeLister() discoverylister.ClusterDuckTypeLister

func (*Listers) GetCustomResourceDefinitionLister

func (l *Listers) GetCustomResourceDefinitionLister() kubev1lister.CustomResourceDefinitionLister

func (*Listers) GetDiscoveryObjects

func (l *Listers) GetDiscoveryObjects() []runtime.Object

func (*Listers) GetKubeObjects

func (l *Listers) GetKubeObjects() []runtime.Object

func (*Listers) IndexerFor

func (l *Listers) IndexerFor(obj runtime.Object) cache.Indexer

IndexerFor returns the indexer for the given object.

func (*Listers) NewScheme

func (*Listers) NewScheme() *runtime.Scheme

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL