Documentation
¶
Index ¶
- Constants
- func SetAlertManagerWithManager(mgr manager.Manager) error
- func SetNewKafkaFromCluster(...)
- func SetupCruiseControlWithManager(mgr ctrl.Manager) *ctrl.Builder
- func SetupKafkaClusterWithManager(mgr ctrl.Manager) *ctrl.Builder
- func SetupKafkaTopicWithManager(mgr ctrl.Manager, maxConcurrentReconciles int) *ctrl.Builder
- func SetupKafkaUserWithManager(mgr ctrl.Manager, certSigningEnabled bool, certManagerNamespace bool) *ctrl.Builder
- type AController
- type CruiseControlOperation
- type CruiseControlTask
- type CruiseControlTaskReconciler
- type CruiseControlTasksAndStates
- func (s *CruiseControlTasksAndStates) Add(t *CruiseControlTask)
- func (s *CruiseControlTasksAndStates) GetActiveTasksByOp(o CruiseControlOperation) []*CruiseControlTask
- func (s CruiseControlTasksAndStates) IsEmpty() bool
- func (s *CruiseControlTasksAndStates) NumActiveTasksByOp(o CruiseControlOperation) int
- func (s *CruiseControlTasksAndStates) SyncState(instance *kafkav1beta1.KafkaCluster)
- type KafkaClusterReconciler
- type KafkaTopicReconciler
- type KafkaUserReconciler
- type SkipClusterRegistryOwnedResourcePredicate
- func (SkipClusterRegistryOwnedResourcePredicate) Create(e event.CreateEvent) bool
- func (SkipClusterRegistryOwnedResourcePredicate) Delete(e event.DeleteEvent) bool
- func (p SkipClusterRegistryOwnedResourcePredicate) Generic(e event.GenericEvent) bool
- func (p SkipClusterRegistryOwnedResourcePredicate) Update(e event.UpdateEvent) bool
Constants ¶
const (
DefaultRequeueAfterTimeInSec = 20
)
Variables ¶
This section is empty.
Functions ¶
func SetAlertManagerWithManager ¶
SetAlertManagerWithManager creates a new Alertmanager Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.
func SetNewKafkaFromCluster ¶
func SetNewKafkaFromCluster(f func(k8sclient client.Client, cluster *v1beta1.KafkaCluster) (kafkaclient.KafkaClient, func(), error))
func SetupCruiseControlWithManager ¶
SetupCruiseControlWithManager registers cruise control controller to the manager
func SetupKafkaClusterWithManager ¶
SetupKafkaClusterWithManager registers kafka cluster controller to the manager
func SetupKafkaTopicWithManager ¶
SetupKafkaTopicWithManager registers kafka topic controller with manager
Types ¶
type AController ¶
AController implements Runnable
type CruiseControlOperation ¶ added in v0.21.0
type CruiseControlOperation int8
const ( OperationAddBroker CruiseControlOperation = iota OperationRemoveBroker OperationRebalanceDisks )
type CruiseControlTask ¶ added in v0.21.0
type CruiseControlTask struct { TaskID string StartedAt string BrokerID string BrokerState kafkav1beta1.CruiseControlState Volume string VolumeState kafkav1beta1.CruiseControlVolumeState Err string Operation CruiseControlOperation }
CruiseControlTask defines a task to be performed via Cruise Control.
func (*CruiseControlTask) Apply ¶ added in v0.21.0
func (t *CruiseControlTask) Apply(instance *kafkav1beta1.KafkaCluster)
Apply takes a kafkav1beta1.KafkaCluster instance and updates its Status field to reflect the state of the task.
func (*CruiseControlTask) FromResult ¶ added in v0.21.0
func (t *CruiseControlTask) FromResult(result *scale.Result)
FromResult takes a scale.Result instance returned by scale.CruiseControlScaler and updates its own state accordingly.
func (*CruiseControlTask) IsDone ¶ added in v0.21.0
func (t *CruiseControlTask) IsDone() bool
IsDone returns true if the task is considered finished.
type CruiseControlTaskReconciler ¶
CruiseControlTaskReconciler reconciles a kafka cluster object
func (*CruiseControlTaskReconciler) UpdateStatus ¶ added in v0.21.0
func (r *CruiseControlTaskReconciler) UpdateStatus(ctx context.Context, instance *kafkav1beta1.KafkaCluster, taskAndStates *CruiseControlTasksAndStates) error
UpdateStatus updates the Status of the provided kafkav1beta1.KafkaCluster instance with the status of the tasks from a CruiseControlTasksAndStates and sends the updates to the Kubernetes API if any changes in the Status field is detected. Otherwise, this step is skipped.
type CruiseControlTasksAndStates ¶ added in v0.21.0
type CruiseControlTasksAndStates struct {
// contains filtered or unexported fields
}
CruiseControlTasksAndStates is a container for CruiseControlTask objects.
func (*CruiseControlTasksAndStates) Add ¶ added in v0.21.0
func (s *CruiseControlTasksAndStates) Add(t *CruiseControlTask)
Add registers the provided CruiseControlTask instance.
func (*CruiseControlTasksAndStates) GetActiveTasksByOp ¶ added in v0.21.0
func (s *CruiseControlTasksAndStates) GetActiveTasksByOp(o CruiseControlOperation) []*CruiseControlTask
GetActiveTasksByOp returns a list of active CruiseControlTask filtered by the provided CruiseControlOperation type.
func (CruiseControlTasksAndStates) IsEmpty ¶ added in v0.21.0
func (s CruiseControlTasksAndStates) IsEmpty() bool
IsEmpty returns true if CruiseControlTasksAndStates has no CruiseControlTask added.
func (*CruiseControlTasksAndStates) NumActiveTasksByOp ¶ added in v0.21.0
func (s *CruiseControlTasksAndStates) NumActiveTasksByOp(o CruiseControlOperation) int
NumActiveTasksByOp the number of active CruiseControlTask instances stored.
func (*CruiseControlTasksAndStates) SyncState ¶ added in v0.21.0
func (s *CruiseControlTasksAndStates) SyncState(instance *kafkav1beta1.KafkaCluster)
SyncState makes sure that the status of the provided kafkav1beta1.KafkaCluster reflects the state of the CruiseControlTask instances.
type KafkaClusterReconciler ¶
type KafkaClusterReconciler struct { client.Client DirectClient client.Reader Namespaces []string KafkaClientProvider kafkaclient.Provider }
KafkaClusterReconciler reconciles a KafkaCluster object
type KafkaTopicReconciler ¶
type KafkaTopicReconciler struct { // This client, initialized using mgr.Client() above, is a split client // that reads objects from the cache and writes to the apiserver Client client.Client Scheme *runtime.Scheme }
KafkaTopicReconciler reconciles a KafkaTopic object
type KafkaUserReconciler ¶
type KafkaUserReconciler struct { // This client, initialized using mgr.Client() above, is a split client // that reads objects from the cache and writes to the apiserver Client client.Client Scheme *runtime.Scheme }
KafkaUserReconciler reconciles a KafkaUser object
type SkipClusterRegistryOwnedResourcePredicate ¶ added in v0.21.0
type SkipClusterRegistryOwnedResourcePredicate struct{}
SkipClusterRegistryOwnedResourcePredicate returns a controller event filter that filters out events triggered by Cluster Registry owned resources
func (SkipClusterRegistryOwnedResourcePredicate) Create ¶ added in v0.21.0
func (SkipClusterRegistryOwnedResourcePredicate) Create(e event.CreateEvent) bool
func (SkipClusterRegistryOwnedResourcePredicate) Delete ¶ added in v0.21.0
func (SkipClusterRegistryOwnedResourcePredicate) Delete(e event.DeleteEvent) bool
func (SkipClusterRegistryOwnedResourcePredicate) Generic ¶ added in v0.21.0
func (p SkipClusterRegistryOwnedResourcePredicate) Generic(e event.GenericEvent) bool
func (SkipClusterRegistryOwnedResourcePredicate) Update ¶ added in v0.21.0
func (p SkipClusterRegistryOwnedResourcePredicate) Update(e event.UpdateEvent) bool