Documentation ¶
Index ¶
- func MakeFactory(ctor Ctor, unstructured bool, logger *zap.SugaredLogger) Factory
- func NewConfigMap(name, namespace string, o ...ConfigMapOption) *v1.ConfigMap
- func NewEndpoints(name, namespace string, so ...EndpointsOption) *corev1.Endpoints
- func NewEventType(name, namespace string, o ...EventTypeOption) *v1beta1.EventType
- func NewNamespace(name string, o ...NamespaceOption) *corev1.Namespace
- func NewScheme() *runtime.Scheme
- func NewService(name, namespace string, so ...ServiceOption) *corev1.Service
- func NewUnstructured(gvk metav1.GroupVersionKind, name, namespace string, uo ...UnstructuredOption) *unstructured.Unstructured
- func ToUnstructured(t *testing.T, objs []runtime.Object) (us []runtime.Object)
- func WithEventTypeBrokerDoesNotExist(et *v1beta1.EventType)
- func WithEventTypeBrokerExists(et *v1beta1.EventType)
- func WithEventTypeBrokerReady(et *v1beta1.EventType)
- func WithEventTypeDeletionTimestamp(et *v1beta1.EventType)
- func WithInitEventTypeConditions(et *v1beta1.EventType)
- func WithNamespaceDeleted(n *corev1.Namespace)
- type ConfigMapOption
- type Ctor
- type EndpointsOption
- func WithEndpointsAddresses(addrs ...corev1.EndpointAddress) EndpointsOption
- func WithEndpointsAnnotations(annotations map[string]string) EndpointsOption
- func WithEndpointsLabels(labels map[string]string) EndpointsOption
- func WithEndpointsNotReadyAddresses(addrs ...corev1.EndpointAddress) EndpointsOption
- type EventTypeOption
- func WithEventTypeBroker(broker string) EventTypeOption
- func WithEventTypeBrokerFailed(reason, message string) EventTypeOption
- func WithEventTypeBrokerUnknown(reason, message string) EventTypeOption
- func WithEventTypeDescription(description string) EventTypeOption
- func WithEventTypeLabels(labels map[string]string) EventTypeOption
- func WithEventTypeOwnerReference(ownerRef metav1.OwnerReference) EventTypeOption
- func WithEventTypeSource(source *apis.URL) EventTypeOption
- func WithEventTypeType(t string) EventTypeOption
- type Listers
- func (l *Listers) GetAPIExtensionObjects() []runtime.Object
- func (l *Listers) GetAllObjects() []runtime.Object
- func (l *Listers) GetConfigMapLister() corev1listers.ConfigMapLister
- func (l *Listers) GetCustomResourceDefinitionLister() apiextensionsv1listers.CustomResourceDefinitionLister
- func (l *Listers) GetDeploymentLister() appsv1listers.DeploymentLister
- func (l *Listers) GetEndpointsLister() corev1listers.EndpointsLister
- func (l *Listers) GetEventTypeLister() eventingv1beta1listers.EventTypeLister
- func (l *Listers) GetEventingObjects() []runtime.Object
- func (l *Listers) GetK8sServiceLister() corev1listers.ServiceLister
- func (l *Listers) GetKubeObjects() []runtime.Object
- func (l *Listers) GetNamespaceLister() corev1listers.NamespaceLister
- func (l *Listers) GetRoleBindingLister() rbacv1listers.RoleBindingLister
- func (l *Listers) GetServiceAccountLister() corev1listers.ServiceAccountLister
- func (l *Listers) GetServiceLister() corev1listers.ServiceLister
- func (l *Listers) GetSubscriberObjects() []runtime.Object
- type NamespaceOption
- type ServiceOption
- type UnstructuredOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeFactory ¶
func MakeFactory(ctor Ctor, unstructured bool, logger *zap.SugaredLogger) Factory
MakeFactory creates a reconciler factory with fake clients and controller created by `ctor`.
func NewConfigMap ¶ added in v0.16.0
func NewConfigMap(name, namespace string, o ...ConfigMapOption) *v1.ConfigMap
NewConfigMap creates a new ConfigMap.
func NewEndpoints ¶ added in v0.16.0
func NewEndpoints(name, namespace string, so ...EndpointsOption) *corev1.Endpoints
NewEndpoints creates a Endpoints with EndpointsOptions
func NewEventType ¶ added in v0.16.0
func NewEventType(name, namespace string, o ...EventTypeOption) *v1beta1.EventType
NewEventType creates a EventType with EventTypeOptions.
func NewNamespace ¶
func NewNamespace(name string, o ...NamespaceOption) *corev1.Namespace
NewNamespace creates a Namespace with NamespaceOptions
func NewService ¶ added in v0.16.0
func NewService(name, namespace string, so ...ServiceOption) *corev1.Service
NewService creates a Service with ServiceOptions
func NewUnstructured ¶ added in v0.16.0
func NewUnstructured(gvk metav1.GroupVersionKind, name, namespace string, uo ...UnstructuredOption) *unstructured.Unstructured
NewUnstructured creates a unstructured.Unstructured with UnstructuredOption
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.
func WithEventTypeBrokerDoesNotExist ¶ added in v0.16.0
WithEventTypeBrokerNotFound calls .Status.MarkFilterFailed on the EventType.
func WithEventTypeBrokerExists ¶ added in v0.16.0
WithEventTypeBrokerExists calls .Status.MarkBrokerExists on the EventType.
func WithEventTypeBrokerReady ¶ added in v0.16.0
WithEventTypeBrokerReady calls .Status.MarkBrokerReady on the EventType.
func WithEventTypeDeletionTimestamp ¶ added in v0.16.0
func WithInitEventTypeConditions ¶ added in v0.16.0
WithInitEventTypeConditions initializes the EventType's conditions.
func WithNamespaceDeleted ¶
Types ¶
type ConfigMapOption ¶ added in v0.16.0
ConfigMapOption enables further configuration of a ConfigMap.
func WithConfigMapData ¶ added in v0.16.0
func WithConfigMapData(data map[string]string) ConfigMapOption
func WithConfigMapLabels ¶ added in v0.16.0
func WithConfigMapLabels(labels metav1.LabelSelector) ConfigMapOption
type Ctor ¶
type Ctor func(context.Context, *Listers, configmap.Watcher) controller.Reconciler
Ctor functions create a k8s controller with given params.
type EndpointsOption ¶ added in v0.16.0
EndpointsOption enables further configuration of a Endpoints.
func WithEndpointsAddresses ¶ added in v0.16.0
func WithEndpointsAddresses(addrs ...corev1.EndpointAddress) EndpointsOption
func WithEndpointsAnnotations ¶ added in v0.16.0
func WithEndpointsAnnotations(annotations map[string]string) EndpointsOption
func WithEndpointsLabels ¶ added in v0.16.0
func WithEndpointsLabels(labels map[string]string) EndpointsOption
func WithEndpointsNotReadyAddresses ¶ added in v0.16.0
func WithEndpointsNotReadyAddresses(addrs ...corev1.EndpointAddress) EndpointsOption
type EventTypeOption ¶ added in v0.16.0
EventTypeOption enables further configuration of an EventType.
func WithEventTypeBroker ¶ added in v0.16.0
func WithEventTypeBroker(broker string) EventTypeOption
func WithEventTypeBrokerFailed ¶ added in v0.16.0
func WithEventTypeBrokerFailed(reason, message string) EventTypeOption
func WithEventTypeBrokerUnknown ¶ added in v0.16.0
func WithEventTypeBrokerUnknown(reason, message string) EventTypeOption
func WithEventTypeDescription ¶ added in v0.16.0
func WithEventTypeDescription(description string) EventTypeOption
func WithEventTypeLabels ¶ added in v0.16.0
func WithEventTypeLabels(labels map[string]string) EventTypeOption
func WithEventTypeOwnerReference ¶ added in v0.16.0
func WithEventTypeOwnerReference(ownerRef metav1.OwnerReference) EventTypeOption
func WithEventTypeSource ¶ added in v0.16.0
func WithEventTypeSource(source *apis.URL) EventTypeOption
func WithEventTypeType ¶ added in v0.16.0
func WithEventTypeType(t string) EventTypeOption
type Listers ¶
type Listers struct {
// contains filtered or unexported fields
}
func NewListers ¶
func (*Listers) GetAPIExtensionObjects ¶ added in v0.22.0
func (*Listers) GetAllObjects ¶
func (*Listers) GetConfigMapLister ¶
func (l *Listers) GetConfigMapLister() corev1listers.ConfigMapLister
func (*Listers) GetCustomResourceDefinitionLister ¶
func (l *Listers) GetCustomResourceDefinitionLister() apiextensionsv1listers.CustomResourceDefinitionLister
func (*Listers) GetDeploymentLister ¶
func (l *Listers) GetDeploymentLister() appsv1listers.DeploymentLister
func (*Listers) GetEndpointsLister ¶
func (l *Listers) GetEndpointsLister() corev1listers.EndpointsLister
func (*Listers) GetEventTypeLister ¶
func (l *Listers) GetEventTypeLister() eventingv1beta1listers.EventTypeLister
func (*Listers) GetEventingObjects ¶
func (*Listers) GetK8sServiceLister ¶
func (l *Listers) GetK8sServiceLister() corev1listers.ServiceLister
func (*Listers) GetKubeObjects ¶
func (*Listers) GetNamespaceLister ¶
func (l *Listers) GetNamespaceLister() corev1listers.NamespaceLister
func (*Listers) GetRoleBindingLister ¶
func (l *Listers) GetRoleBindingLister() rbacv1listers.RoleBindingLister
func (*Listers) GetServiceAccountLister ¶
func (l *Listers) GetServiceAccountLister() corev1listers.ServiceAccountLister
func (*Listers) GetServiceLister ¶
func (l *Listers) GetServiceLister() corev1listers.ServiceLister
func (*Listers) GetSubscriberObjects ¶
type NamespaceOption ¶
NamespaceOption enables further configuration of a Namespace.
func WithNamespaceLabeled ¶
func WithNamespaceLabeled(labels map[string]string) NamespaceOption
type ServiceOption ¶ added in v0.16.0
ServiceOption enables further configuration of a Service.
func WithServiceAnnotations ¶ added in v0.16.0
func WithServiceAnnotations(annotations map[string]string) ServiceOption
func WithServiceLabels ¶ added in v0.16.0
func WithServiceLabels(labels map[string]string) ServiceOption
func WithServiceOwnerReferences ¶ added in v0.16.0
func WithServiceOwnerReferences(ownerReferences []metav1.OwnerReference) ServiceOption
func WithServicePorts ¶ added in v0.16.0
func WithServicePorts(ports []corev1.ServicePort) ServiceOption
type UnstructuredOption ¶ added in v0.16.0
type UnstructuredOption func(*unstructured.Unstructured)
UnstructuredOption enables further configuration of a Unstructured.
func WithUnstructuredAddressable ¶ added in v0.16.0
func WithUnstructuredAddressable(hostname string) UnstructuredOption