cluster

package
v0.0.0-...-830b495 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: BSD-3-Clause, Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SuccessSynced is used as part of the Event 'reason' when a MySQSL is
	// synced.
	SuccessSynced = "Synced"

	// MessageResourceSynced is the message used for an Event fired when a
	// Cluster is synced successfully
	MessageResourceSynced = "Cluster synced successfully"

	// ErrResourceExists is used as part of the Event 'reason' when a
	// Cluster fails to sync due to a resource of the same name already
	// existing.
	ErrResourceExists = "ErrResourceExists"

	// MessageResourceExists is the message used for Events when a resource
	// fails to sync due to a resource already existing.
	MessageResourceExists = "%s %s/%s already exists and is not managed by Cluster"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerController

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

The BrokerController watches the Kubernetes API for changes to rocketmq resources

func NewBrokerController

func NewBrokerController(
	opConfig operatoropts.OperatorOpts,
	opClient clientset.Interface,
	kubeClient kubernetes.Interface,
	clusterInformer informersv1alpha1.BrokerClusterInformer,
	statefulSetInformer appsinformers.StatefulSetInformer,
	podInformer coreinformers.PodInformer,
	serviceInformer coreinformers.ServiceInformer,
	resyncPeriod time.Duration,
	namespace string,
) *BrokerController

NewBrokerController creates a new BrokerController.

func (*BrokerController) Run

func (m *BrokerController) Run(ctx context.Context, threadiness int)

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

type PodControlInterface

type PodControlInterface interface {
	PatchPod(old *v1.Pod, new *v1.Pod) error
}

PodControlInterface defines the interface that the ClusterController uses to create, update, and delete broker pods. It is implemented as an interface to enable testing.

func NewRealPodControl

func NewRealPodControl(client kubernetes.Interface, podLister corelistersv1.PodLister) PodControlInterface

NewRealPodControl creates a concrete implementation of the PodControlInterface.

type ServiceControlInterface

type ServiceControlInterface interface {
	CreateService(s *corev1.Service) error
}

ServiceControlInterface defines the interface that the ClusterController uses to create Services. It is implemented as an interface to enable testing.

func NewRealServiceControl

func NewRealServiceControl(client kubernetes.Interface, serviceLister corelistersv1.ServiceLister) ServiceControlInterface

NewRealServiceControl creates a concrete implementation of the ServiceControlInterface.

type StatefulSetControlInterface

type StatefulSetControlInterface interface {
	CreateStatefulSet(ss *apps.StatefulSet) error
	Patch(old *apps.StatefulSet, new *apps.StatefulSet) error
}

StatefulSetControlInterface defines the interface that the ClusterController uses to create and update StatefulSets. It is implemented as an interface to enable testing.

func NewRealStatefulSetControl

func NewRealStatefulSetControl(client kubernetes.Interface, statefulSetLister appslistersv1.StatefulSetLister) StatefulSetControlInterface

NewRealStatefulSetControl creates a concrete implementation of the StatefulSetControlInterface.

Jump to

Keyboard shortcuts

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