Documentation ¶
Index ¶
- func AddKafkaTopicIndexers(ctx context.Context, cache cache.Cache) error
- func AddNewBrokerToCr(broker v1beta1.Broker, crName, namespace string, client runtimeClient.Client) error
- func AddPvToSpecificBroker(brokerID, crName, namespace string, storageConfig *v1beta1.StorageConfig, ...) error
- func CheckIfObjectUpdated(log logr.Logger, desiredType reflect.Type, current, desired runtime.Object) bool
- func CreateInternalListenerStatuses(kafkaCluster *banzaicloudv1beta1.KafkaCluster) (map[string]banzaicloudv1beta1.ListenerStatusList, ...)
- func DeleteStatus(c client.Client, brokerID string, cluster *banzaicloudv1beta1.KafkaCluster, ...) error
- func GetCr(name, namespace string, client runtimeClient.Client) (*v1beta1.KafkaCluster, error)
- func GetDefaultInitContainerResourceRequirements() corev1.ResourceRequirements
- func IsAlreadyOwnedError(err error) bool
- func IsMarkedForDeletion(m metav1.ObjectMeta) bool
- func IsPodContainsEvictedContainer(pod *corev1.Pod) bool
- func IsPodContainsPendingContainer(pod *corev1.Pod) bool
- func IsPodContainsShutdownContainer(pod *corev1.Pod) bool
- func IsPodContainsTerminatedContainer(pod *corev1.Pod) bool
- func LookupKafkaCluster(ctx context.Context, client runtimeClient.Reader, ...) (cluster *v1beta1.KafkaCluster, err error)
- func Reconcile(log logr.Logger, client runtimeClient.Client, desired runtime.Object, ...) error
- func RemoveBrokerFromCr(brokerID, crName, namespace string, client runtimeClient.Client) error
- func UpdateBrokerConfigurationBackup(c client.Client, cluster *banzaicloudv1beta1.KafkaCluster) error
- func UpdateBrokerStatus(c client.Client, brokerIDs []string, cluster *banzaicloudv1beta1.KafkaCluster, ...) error
- func UpdateCRStatus(c client.Client, cluster *banzaicloudv1beta1.KafkaCluster, state interface{}, ...) error
- func UpdateCr(cr *v1beta1.KafkaCluster, client runtimeClient.Client) error
- func UpdateCrWithRackAwarenessConfig(pod *corev1.Pod, cr *v1beta1.KafkaCluster, client runtimeClient.Client, ...) (v1beta1.RackAwarenessState, error)
- func UpdateCrWithRollingUpgrade(errorCount int, cr *v1beta1.KafkaCluster, client runtimeClient.Client, ...) error
- func UpdateListenerStatuses(ctx context.Context, c client.Client, cluster *banzaicloudv1beta1.KafkaCluster, ...) error
- func UpdateRollingUpgradeState(c client.Client, cluster *banzaicloudv1beta1.KafkaCluster, time time.Time, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddKafkaTopicIndexers ¶ added in v0.20.1
func AddNewBrokerToCr ¶
func AddNewBrokerToCr(broker v1beta1.Broker, crName, namespace string, client runtimeClient.Client) error
AddNewBrokerToCr modifies the CR and adds a new broker
func AddPvToSpecificBroker ¶
func AddPvToSpecificBroker(brokerID, crName, namespace string, storageConfig *v1beta1.StorageConfig, client runtimeClient.Client) error
AddPvToSpecificBroker adds a new PV to a specific broker
func CheckIfObjectUpdated ¶
func CheckIfObjectUpdated(log logr.Logger, desiredType reflect.Type, current, desired runtime.Object) bool
CheckIfObjectUpdated checks if the given object is updated using K8sObjectMatcher
func CreateInternalListenerStatuses ¶
func CreateInternalListenerStatuses(kafkaCluster *banzaicloudv1beta1.KafkaCluster) (map[string]banzaicloudv1beta1.ListenerStatusList, map[string]banzaicloudv1beta1.ListenerStatusList)
func DeleteStatus ¶
func DeleteStatus(c client.Client, brokerID string, cluster *banzaicloudv1beta1.KafkaCluster, logger logr.Logger) error
DeleteStatus deletes the given broker state from the CR
func GetCr ¶
func GetCr(name, namespace string, client runtimeClient.Client) (*v1beta1.KafkaCluster, error)
GetCr returns the given cr object
func GetDefaultInitContainerResourceRequirements ¶
func GetDefaultInitContainerResourceRequirements() corev1.ResourceRequirements
func IsAlreadyOwnedError ¶
IsAlreadyOwnedError checks if a controller already own the instance
func IsMarkedForDeletion ¶
func IsMarkedForDeletion(m metav1.ObjectMeta) bool
IsMarkedForDeletion determines if the object is marked for deletion
func IsPodContainsEvictedContainer ¶
IsPodContainsEvictedContainer returns true if pod status has an evicted reason false otherwise
func IsPodContainsShutdownContainer ¶ added in v0.18.2
IsPodContainsShutdownContainer returns true if pod status has an shutdown reason false otherwise
func LookupKafkaCluster ¶
func LookupKafkaCluster(ctx context.Context, client runtimeClient.Reader, clusterName, clusterNamespace string) (cluster *v1beta1.KafkaCluster, err error)
LookupKafkaCluster returns the running cluster instance based on its name and namespace
func Reconcile ¶
func Reconcile(log logr.Logger, client runtimeClient.Client, desired runtime.Object, cr *v1beta1.KafkaCluster) error
Reconcile reconciles K8S resources
func RemoveBrokerFromCr ¶
func RemoveBrokerFromCr(brokerID, crName, namespace string, client runtimeClient.Client) error
RemoveBrokerFromCr modifies the CR and removes the given broker from the cluster
func UpdateBrokerConfigurationBackup ¶ added in v0.22.0
func UpdateBrokerConfigurationBackup(c client.Client, cluster *banzaicloudv1beta1.KafkaCluster) error
UpdateBrokerConfigurationBackup updates the broker status with a backup from kafka broker configurations
func UpdateBrokerStatus ¶
func UpdateBrokerStatus(c client.Client, brokerIDs []string, cluster *banzaicloudv1beta1.KafkaCluster, state interface{}, logger logr.Logger) error
UpdateBrokerStatus updates the broker status with rack and configuration infos
func UpdateCRStatus ¶
func UpdateCRStatus(c client.Client, cluster *banzaicloudv1beta1.KafkaCluster, state interface{}, logger logr.Logger) error
UpdateCRStatus updates the cluster state
func UpdateCr ¶
func UpdateCr(cr *v1beta1.KafkaCluster, client runtimeClient.Client) error
func UpdateCrWithRackAwarenessConfig ¶
func UpdateCrWithRackAwarenessConfig(pod *corev1.Pod, cr *v1beta1.KafkaCluster, client runtimeClient.Client, directClient runtimeClient.Reader) (v1beta1.RackAwarenessState, error)
UpdateCrWithRackAwarenessConfig updates the CR with rack awareness config
func UpdateCrWithRollingUpgrade ¶
func UpdateCrWithRollingUpgrade(errorCount int, cr *v1beta1.KafkaCluster, client runtimeClient.Client, logger logr.Logger) error
UpdateCrWithRollingUpgrade modifies CR status
func UpdateListenerStatuses ¶
func UpdateListenerStatuses(ctx context.Context, c client.Client, cluster *banzaicloudv1beta1.KafkaCluster, intListenerStatuses, extListenerStatuses map[string]banzaicloudv1beta1.ListenerStatusList) error
func UpdateRollingUpgradeState ¶
func UpdateRollingUpgradeState(c client.Client, cluster *banzaicloudv1beta1.KafkaCluster, time time.Time, logger logr.Logger) error
UpdateRollingUpgradeState updates the state of the cluster with rolling upgrade info
Types ¶
This section is empty.