Documentation ¶
Index ¶
- 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 DeleteStatus(c client.Client, brokerId string, cluster *v1beta1.KafkaCluster, ...) error
- func GetCr(name, namespace string, client runtimeClient.Client) (*v1beta1.KafkaCluster, error)
- func IsAlreadyOwnedError(err error) bool
- func IsMarkedForDeletion(m metav1.ObjectMeta) bool
- func IsPodContainsEvictedContainer(pod *corev1.Pod) bool
- func IsPodContainsPendingContainer(pod *corev1.Pod) bool
- func IsPodContainsTerminatedContainer(pod *corev1.Pod) bool
- func LookupKafkaCluster(client runtimeClient.Client, clusterName, clusterNamespace string) (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 UpdateBrokerStatus(c client.Client, brokerIds []string, cluster *v1beta1.KafkaCluster, ...) error
- func UpdateCRStatus(c client.Client, cluster *v1beta1.KafkaCluster, state interface{}, ...) 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 UpdateRollingUpgradeState(c client.Client, cluster *v1beta1.KafkaCluster, time time.Time, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 DeleteStatus ¶
func DeleteStatus(c client.Client, brokerId string, cluster *v1beta1.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 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 ¶ added in v0.12.0
IsPodContainsEvictedContainer returns true if pod status has an evicted reason false otherwise
func LookupKafkaCluster ¶
func LookupKafkaCluster(client runtimeClient.Client, 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 UpdateBrokerStatus ¶
func UpdateBrokerStatus(c client.Client, brokerIds []string, cluster *v1beta1.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 *v1beta1.KafkaCluster, state interface{}, logger logr.Logger) error
UpdateCRStatus updates the cluster state
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) error
UpdateCrWithRollingUpgrade modifies CR status
Types ¶
This section is empty.