v1

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 42 Imported by: 1

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 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

NewScheme returns a new runtime.Scheme.

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
}

Listers provides access to Listers for various objects.

func NewListers

func NewListers(objs []runtime.Object) Listers

NewListers returns a new Listers.

func (*Listers) GetCachingObjects

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

GetCachingObjects returns the runtime.Objects from the fakecachingclientset.

func (*Listers) GetCertificateLister

func (l *Listers) GetCertificateLister() networkinglisters.CertificateLister

GetCertificateLister get lister for Certificate resource.

func (*Listers) GetConfigurationLister

func (l *Listers) GetConfigurationLister() servinglisters.ConfigurationLister

GetConfigurationLister gets the Configuration lister.

func (*Listers) GetDeploymentLister

func (l *Listers) GetDeploymentLister() appsv1listers.DeploymentLister

GetDeploymentLister returns a lister for Deployment objects.

func (*Listers) GetDomainClaimLister added in v0.21.0

func (l *Listers) GetDomainClaimLister() networkinglisters.ClusterDomainClaimLister

GetDomainClaimLister get listers for ClusterDomainClaim resource.

func (*Listers) GetDomainMappingLister added in v0.19.0

func (l *Listers) GetDomainMappingLister() servingv1alpha1listers.DomainMappingLister

GetDomainMappingLister returns a lister for DomainMapping objects.

func (*Listers) GetEndpointsLister

func (l *Listers) GetEndpointsLister() corev1listers.EndpointsLister

GetEndpointsLister returns a lister for Endpoints objects.

func (*Listers) GetHorizontalPodAutoscalerLister

func (l *Listers) GetHorizontalPodAutoscalerLister() autoscalingv2beta1listers.HorizontalPodAutoscalerLister

GetHorizontalPodAutoscalerLister gets lister for HorizontalPodAutoscaler resources.

func (*Listers) GetImageLister

func (l *Listers) GetImageLister() cachinglisters.ImageLister

GetImageLister returns a lister for Image objects.

func (*Listers) GetIngressLister

func (l *Listers) GetIngressLister() networkinglisters.IngressLister

GetIngressLister get lister for Ingress resource.

func (*Listers) GetK8sServiceLister

func (l *Listers) GetK8sServiceLister() corev1listers.ServiceLister

GetK8sServiceLister returns a lister for K8sService objects.

func (*Listers) GetKnCertificateLister

func (l *Listers) GetKnCertificateLister() networkinglisters.CertificateLister

GetKnCertificateLister gets lister for Knative Certificate resource.

func (*Listers) GetKubeObjects

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

GetKubeObjects returns the runtime.Objects from the fakekubeclientset.

func (*Listers) GetMetricLister

func (l *Listers) GetMetricLister() palisters.MetricLister

GetMetricLister returns a lister for the Metric objects.

func (*Listers) GetNamespaceLister

func (l *Listers) GetNamespaceLister() corev1listers.NamespaceLister

GetNamespaceLister gets lister for Namespace resource.

func (*Listers) GetNetworkingObjects added in v0.16.0

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

GetNetworkingObjects returns the runtime.Objects from the fakenetworkingclientset.

func (*Listers) GetPodAutoscalerLister

func (l *Listers) GetPodAutoscalerLister() palisters.PodAutoscalerLister

GetPodAutoscalerLister gets the PodAutoscaler lister.

func (*Listers) GetPodsLister

func (l *Listers) GetPodsLister() corev1listers.PodLister

GetPodsLister gets lister for pods.

func (*Listers) GetRevisionLister

func (l *Listers) GetRevisionLister() servinglisters.RevisionLister

GetRevisionLister gets the Revision lister.

func (*Listers) GetRouteLister

func (l *Listers) GetRouteLister() servinglisters.RouteLister

GetRouteLister returns a lister for Route objects.

func (*Listers) GetServerlessServiceLister

func (l *Listers) GetServerlessServiceLister() networkinglisters.ServerlessServiceLister

GetServerlessServiceLister returns a lister for the ServerlessService objects.

func (*Listers) GetServiceLister

func (l *Listers) GetServiceLister() servinglisters.ServiceLister

GetServiceLister returns a lister for Service objects.

func (*Listers) GetServingObjects

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

GetServingObjects returns the runtime.Objects from the fakeservingclientset.

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

NewScheme returns a new runtime.Scheme.

Jump to

Keyboard shortcuts

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