Documentation ¶
Index ¶
- func MakeFactory(ctor Ctor) reconcilertesting.Factory
- func NewDeployment(name, namespace string, do ...DeploymentOption) *appsv1.Deployment
- func NewMongoDbSource(name, namespace string, o ...MongoDbSourceOption) *v1alpha1.MongoDbSource
- func WithInitMongoDbSourceConditions(s *v1alpha1.MongoDbSource)
- func WithMongoDbSourceSinkNotFound(s *v1alpha1.MongoDbSource)
- type Ctor
- type DeploymentOption
- func WithDeploymentAnnotations(annotations map[string]string) DeploymentOption
- func WithDeploymentAvailable() DeploymentOption
- func WithDeploymentContainer(name, image string, liveness *corev1.Probe, readiness *corev1.Probe, ...) DeploymentOption
- func WithDeploymentLabels(labels map[string]string) DeploymentOption
- func WithDeploymentOwnerReferences(ownerReferences []metav1.OwnerReference) DeploymentOption
- func WithDeploymentServiceAccount(serviceAccountName string) DeploymentOption
- type Listers
- func (l *Listers) GetAllObjects() []runtime.Object
- func (l *Listers) GetDeploymentLister() appsv1listers.DeploymentLister
- func (l *Listers) GetKubeObjects() []runtime.Object
- func (l *Listers) GetMongoDbSourceLister() v1alpha1listers.MongoDbSourceLister
- func (l *Listers) GetSecretLister() corev1listers.SecretLister
- func (l *Listers) GetSourcesObjects() []runtime.Object
- type MongoDbSourceOption
- func WithMongoDbSourceConnectionFailed(err string) MongoDbSourceOption
- func WithMongoDbSourceConnectionSuccess() MongoDbSourceOption
- func WithMongoDbSourceDeployed() MongoDbSourceOption
- func WithMongoDbSourceNotDeployed(name string) MongoDbSourceOption
- func WithMongoDbSourceSink(uri *apis.URL) MongoDbSourceOption
- func WithMongoDbSourceSpec(spec v1alpha1.MongoDbSourceSpec) MongoDbSourceOption
- func WithMongoDbSourceUID(uid string) MongoDbSourceOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeFactory ¶
func MakeFactory(ctor Ctor) reconcilertesting.Factory
MakeFactory creates a reconciler factory with fake clients and controller created by `ctor`.
func NewDeployment ¶
func NewDeployment(name, namespace string, do ...DeploymentOption) *appsv1.Deployment
NewDeployment creates a Deployment with DeploymentOptions.
func NewMongoDbSource ¶
func NewMongoDbSource(name, namespace string, o ...MongoDbSourceOption) *v1alpha1.MongoDbSource
NewMongoDbSource creates a MongoDbSource with MongoDbSourceOption.
func WithInitMongoDbSourceConditions ¶
func WithInitMongoDbSourceConditions(s *v1alpha1.MongoDbSource)
WithInitMongoDbSourceConditions initializes the MongoDbSource's conditions.
func WithMongoDbSourceSinkNotFound ¶
func WithMongoDbSourceSinkNotFound(s *v1alpha1.MongoDbSource)
WithMongoDbSourceSinkNotFound updates the status of the sink to be not found.
Types ¶
type Ctor ¶
type Ctor func(context.Context, *Listers, configmap.Watcher, map[string]interface{}) controller.Reconciler
Ctor functions create a k8s controller with given params.
type DeploymentOption ¶
type DeploymentOption func(*appsv1.Deployment)
DeploymentOption enables further configuration of a Deployment.
func WithDeploymentAnnotations ¶
func WithDeploymentAnnotations(annotations map[string]string) DeploymentOption
WithDeploymentAnnotations adds Annotations to the Deployment.
func WithDeploymentAvailable ¶
func WithDeploymentAvailable() DeploymentOption
WithDeploymentAvailable marks the Deployment as available.
func WithDeploymentContainer ¶
func WithDeploymentContainer(name, image string, liveness *corev1.Probe, readiness *corev1.Probe, envVars []corev1.EnvVar, containerPorts []corev1.ContainerPort) DeploymentOption
WithDeploymentContainer adds Container to the Deployment.
func WithDeploymentLabels ¶
func WithDeploymentLabels(labels map[string]string) DeploymentOption
WithDeploymentLabels adds Labels to the Deployment.
func WithDeploymentOwnerReferences ¶
func WithDeploymentOwnerReferences(ownerReferences []metav1.OwnerReference) DeploymentOption
WithDeploymentOwnerReferences adds OwnerReferences to the Deployment.
func WithDeploymentServiceAccount ¶
func WithDeploymentServiceAccount(serviceAccountName string) DeploymentOption
WithDeploymentServiceAccount adds ServiceAccount to the Deployment.
type Listers ¶
type Listers struct {
// contains filtered or unexported fields
}
Listers holds sorters.
func NewListers ¶
NewListers creates a Listers object with objs.
func (*Listers) GetAllObjects ¶
GetAllObjects returns all the objects.
func (*Listers) GetDeploymentLister ¶
func (l *Listers) GetDeploymentLister() appsv1listers.DeploymentLister
GetDeploymentLister returns the Deployment lister.
func (*Listers) GetKubeObjects ¶
GetKubeObjects returns the kube objects.
func (*Listers) GetMongoDbSourceLister ¶
func (l *Listers) GetMongoDbSourceLister() v1alpha1listers.MongoDbSourceLister
GetMongoDbSourceLister returns the MongoDbSource lister.
func (*Listers) GetSecretLister ¶
func (l *Listers) GetSecretLister() corev1listers.SecretLister
GetSecretLister returns the Secret lister.
func (*Listers) GetSourcesObjects ¶
GetSourcesObjects returns the sources objects.
type MongoDbSourceOption ¶
type MongoDbSourceOption func(*v1alpha1.MongoDbSource)
MongoDbSourceOption enables further configuration of a CronJob.
func WithMongoDbSourceConnectionFailed ¶
func WithMongoDbSourceConnectionFailed(err string) MongoDbSourceOption
WithMongoDbSourceConnectionFailed updates the status of the connection to be failed.
func WithMongoDbSourceConnectionSuccess ¶
func WithMongoDbSourceConnectionSuccess() MongoDbSourceOption
WithMongoDbSourceConnectionSuccess updates the status of the connection to be successful.
func WithMongoDbSourceDeployed ¶
func WithMongoDbSourceDeployed() MongoDbSourceOption
WithMongoDbSourceDeployed updates the status of the source to Deployed.
func WithMongoDbSourceNotDeployed ¶
func WithMongoDbSourceNotDeployed(name string) MongoDbSourceOption
WithMongoDbSourceNotDeployed updates the status of the source to Not Deployed.
func WithMongoDbSourceSink ¶
func WithMongoDbSourceSink(uri *apis.URL) MongoDbSourceOption
WithMongoDbSourceSink updates the status of the sink to be found.
func WithMongoDbSourceSpec ¶
func WithMongoDbSourceSpec(spec v1alpha1.MongoDbSourceSpec) MongoDbSourceOption
WithMongoDbSourceSpec returns a function that updates the Spec field of the MongoDbSource.
func WithMongoDbSourceUID ¶
func WithMongoDbSourceUID(uid string) MongoDbSourceOption
WithMongoDbSourceUID initializes the UID of the MongoDbSource.