Documentation ¶
Index ¶
- Constants
- func IsExpired(ttl time.Duration, finishedAt time.Time) bool
- func SetAlertManagerWithManager(mgr manager.Manager) error
- func SetNewKafkaFromCluster(...)
- func SetupCruiseControlOperationTTLWithManager(mgr ctrl.Manager) *ctrl.Builder
- func SetupCruiseControlOperationWithManager(mgr ctrl.Manager) *ctrl.Builder
- 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, certManagerEnabled bool) *ctrl.Builder
- type AController
- type CruiseControlOperationReconciler
- type CruiseControlOperationTTLReconciler
- type CruiseControlTask
- func (t *CruiseControlTask) Apply(instance *koperatorv1beta1.KafkaCluster)
- func (t *CruiseControlTask) FromResult(operation *koperatorv1alpha1.CruiseControlOperation)
- func (t *CruiseControlTask) IsRequired() bool
- func (t *CruiseControlTask) SetCruiseControlOperationRef(ref corev1.LocalObjectReference)
- func (t *CruiseControlTask) SetStateScheduled()
- type CruiseControlTaskReconciler
- type CruiseControlTasksAndStates
- func (s *CruiseControlTasksAndStates) Add(t *CruiseControlTask)
- func (s *CruiseControlTasksAndStates) GetActiveTasksByOp(o koperatorv1alpha1.CruiseControlTaskOperation) []*CruiseControlTask
- func (s CruiseControlTasksAndStates) IsEmpty() bool
- func (s *CruiseControlTasksAndStates) NumActiveTasksByOp(o koperatorv1alpha1.CruiseControlTaskOperation) int
- func (s *CruiseControlTasksAndStates) SyncState(instance *koperatorv1beta1.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 BrokerCapacityDisk = "DISK" BrokerCapacity = "capacity" )
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 SetupCruiseControlOperationTTLWithManager ¶ added in v0.22.0
SetupCruiseControlWithManager registers cruise control operation controller to the manager
func SetupCruiseControlOperationWithManager ¶ added in v0.22.0
SetupCruiseControlWithManager registers cruise control controller to the manager
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 CruiseControlOperationReconciler ¶ added in v0.22.0
type CruiseControlOperationReconciler struct { client.Client DirectClient client.Reader Scheme *runtime.Scheme ScaleFactory func(ctx context.Context, kafkaCluster *banzaiv1beta1.KafkaCluster) (scale.CruiseControlScaler, error) // contains filtered or unexported fields }
CruiseControlOperationReconciler reconciles CruiseControlOperation custom resources
type CruiseControlOperationTTLReconciler ¶ added in v0.22.0
CruiseControlOperationTTLReconciler reconciles CruiseControlOperation custom resources
type CruiseControlTask ¶ added in v0.21.0
type CruiseControlTask struct { BrokerID string BrokerState koperatorv1beta1.CruiseControlState Volume string VolumeState koperatorv1beta1.CruiseControlVolumeState Operation koperatorv1alpha1.CruiseControlTaskOperation CruiseControlOperationReference *corev1.LocalObjectReference }
CruiseControlTask defines a task to be performed via Cruise Control.
func (*CruiseControlTask) Apply ¶ added in v0.21.0
func (t *CruiseControlTask) Apply(instance *koperatorv1beta1.KafkaCluster)
Apply takes a koperatorv1beta1.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(operation *koperatorv1alpha1.CruiseControlOperation)
FromResult takes a scale.Result instance returned by scale.CruiseControlScaler and updates its own state accordingly.
func (*CruiseControlTask) IsRequired ¶ added in v0.22.0
func (t *CruiseControlTask) IsRequired() bool
IsRequired returns true if the task needs to be executed.
func (*CruiseControlTask) SetCruiseControlOperationRef ¶ added in v0.22.0
func (t *CruiseControlTask) SetCruiseControlOperationRef(ref corev1.LocalObjectReference)
func (*CruiseControlTask) SetStateScheduled ¶ added in v0.22.0
func (t *CruiseControlTask) SetStateScheduled()
type CruiseControlTaskReconciler ¶
type CruiseControlTaskReconciler struct { client.Client // DirectClient here is needed because when the next reconciliation is happened instantly after status update then // the changes in some cases will not be in the resource otherwise. DirectClient client.Reader Scheme *runtime.Scheme ScaleFactory func(ctx context.Context, kafkaCluster *banzaiv1beta1.KafkaCluster) (scale.CruiseControlScaler, error) }
CruiseControlTaskReconciler reconciles a kafka cluster object
func (*CruiseControlTaskReconciler) UpdateStatus ¶ added in v0.21.0
func (r *CruiseControlTaskReconciler) UpdateStatus(ctx context.Context, instance *banzaiv1beta1.KafkaCluster, taskAndStates *CruiseControlTasksAndStates) error
UpdateStatus updates the Status of the provided banzaiv1beta1.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 koperatorv1alpha1.CruiseControlTaskOperation) []*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 koperatorv1alpha1.CruiseControlTaskOperation) int
NumActiveTasksByOp the number of active CruiseControlTask instances stored.
func (*CruiseControlTasksAndStates) SyncState ¶ added in v0.21.0
func (s *CruiseControlTasksAndStates) SyncState(instance *koperatorv1beta1.KafkaCluster)
SyncState makes sure that the status of the provided koperatorv1beta1.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