Documentation
¶
Index ¶
- Constants
- Variables
- func AreStringSlicesIdentical(a, b []string) bool
- func BoolPointer(b bool) *bool
- func ConstructEListenerLabelName(ingressConfigName, eListenerName string) string
- func ConvertConfigEntryListToProperties(config []sarama.ConfigEntry) (*properties.Properties, error)
- func ConvertPropertiesToMapStringPointer(pp *properties.Properties) map[string]*string
- func ConvertStringToInt32(s string) int32
- func CreateLogger(debug bool, development bool) logr.Logger
- func CreateTLSConfigFromSecret(tlsKeys *corev1.Secret) (*tls.Config, error)
- func GenerateEnvoyResourceName(resourceNameFormat string, resourceNameWithScopeFormat string, ...) string
- func GetBrokerFromBrokerConfigurationBackup(config string) (v1beta1.Broker, error)
- func GetBrokerIdsFromStatusAndSpec(brokerStatuses map[string]v1beta1.BrokerState, brokers []v1beta1.Broker, ...) []int
- func GetBrokerImage(brokerConfig *v1beta1.BrokerConfig, clusterImage string) string
- func GetBrokerMetricsReporterImage(brokerConfig *v1beta1.BrokerConfig, kafkaClusterSpec v1beta1.KafkaClusterSpec) string
- func GetClientTLSConfig(client clientCtrl.Reader, secretNamespaceName types.NamespacedName) (*tls.Config, error)
- func GetExternalPortForBroker(externalStartingPort, brokerId int32) int32
- func GetIngressConfigs(kafkaClusterSpec v1beta1.KafkaClusterSpec, ...) (map[string]v1beta1.IngressConfig, string, error)
- func GetRandomString(length int) (string, error)
- func GzipAndBase64BrokerConfiguration(broker *v1beta1.Broker) (string, error)
- func Int32Pointer(i int32) *int32
- func Int64Pointer(i int64) *int64
- func IntPointer(i int) *int
- func IntstrPointer(i int) *intstr.IntOrString
- func IsIngressConfigInUse(iConfigName, defaultConfigName string, cluster *v1beta1.KafkaCluster, ...) bool
- func IsSSLEnabledForInternalCommunication(l []v1beta1.InternalListenerConfig) (enabled bool)
- func MapStringStringPointer(in map[string]string) (out map[string]*string)
- func Max(x, y int) int
- func MergeAnnotations(annotations ...map[string]string) map[string]string
- func ObjectManagedByClusterRegistry(object metav1.Object) bool
- func QuantityPointer(q resource.Quantity) *resource.Quantity
- func RetryOnConflict(backoff wait.Backoff, fn func() error) error
- func RetryOnError(backoff wait.Backoff, fn func() error, isRetryableError func(error) bool) error
- func ShouldIncludeBroker(brokerConfig *v1beta1.BrokerConfig, status v1beta1.KafkaClusterStatus, ...) bool
- func StorageConfigKafkaMountPath(mountPath string) string
- func StringPointer(s string) *string
- func StringSliceContains(list []string, s string) bool
- func StringSliceRemove(list []string, s string) []string
Constants ¶
const ( IngressConfigGlobalName = "globalConfig" ExternalListenerLabelNameTemplate = "%s-%s" ExternalListenerLabelNameKey = "eListenerName" )
Variables ¶
var DefaultBackOffForConflict wait.Backoff = wait.Backoff{ Duration: 20 * time.Millisecond, Jitter: 0, Factor: 2.5, Steps: 6, }
start with 20 ms, multiply by 2.5 each step, 6 steps = ~3 seconds
Functions ¶
func ConstructEListenerLabelName ¶
ConstructEListenerLabelName construct an eListener label name based on ingress config name and listener name
func ConvertConfigEntryListToProperties ¶
func ConvertConfigEntryListToProperties(config []sarama.ConfigEntry) (*properties.Properties, error)
ConvertConfigEntryListToProperties function takes []sarama.ConfigEntry and coverts it to Properties object
func ConvertPropertiesToMapStringPointer ¶
func ConvertPropertiesToMapStringPointer(pp *properties.Properties) map[string]*string
ConvertPropertiesToMapStringPointer converts a Properties object to map[string]*string
func ConvertStringToInt32 ¶
ConvertStringToInt32 converts the given string to int32
func CreateTLSConfigFromSecret ¶ added in v0.25.0
func GenerateEnvoyResourceName ¶
func GenerateEnvoyResourceName(resourceNameFormat string, resourceNameWithScopeFormat string, extListener v1beta1.ExternalListenerConfig, ingressConfig v1beta1.IngressConfig, ingressConfigName, clusterName string) string
func GetBrokerFromBrokerConfigurationBackup ¶ added in v0.22.0
func GetBrokerIdsFromStatusAndSpec ¶
func GetBrokerIdsFromStatusAndSpec(brokerStatuses map[string]v1beta1.BrokerState, brokers []v1beta1.Broker, log logr.Logger) []int
returns the union of the ids of the configured (Spec.Brokers) and the running (BrokerState) brokers
func GetBrokerImage ¶
func GetBrokerImage(brokerConfig *v1beta1.BrokerConfig, clusterImage string) string
GetBrokerImage returns the used broker image
func GetBrokerMetricsReporterImage ¶ added in v0.20.0
func GetBrokerMetricsReporterImage(brokerConfig *v1beta1.BrokerConfig, kafkaClusterSpec v1beta1.KafkaClusterSpec) string
GetBrokerMetricsReporterImage returns the image used for cruise-control metrics reporter
func GetClientTLSConfig ¶ added in v0.20.1
func GetClientTLSConfig(client clientCtrl.Reader, secretNamespaceName types.NamespacedName) (*tls.Config, error)
func GetExternalPortForBroker ¶ added in v0.25.0
func GetIngressConfigs ¶
func GetIngressConfigs(kafkaClusterSpec v1beta1.KafkaClusterSpec, eListenerConfig v1beta1.ExternalListenerConfig) (map[string]v1beta1.IngressConfig, string, error)
GetIngressConfigs compose the ingress configuration for a given externalListener
func GetRandomString ¶
getRandomString returns a random string containing uppercase, lowercase and number characters with the length given
func GzipAndBase64BrokerConfiguration ¶ added in v0.22.0
func Int32Pointer ¶
Int32Pointer generates int32 pointer from int32
func Int64Pointer ¶
Int64Pointer generates int64 pointer from int64
func IntstrPointer ¶
func IntstrPointer(i int) *intstr.IntOrString
IntstrPointer generate IntOrString pointer from int
func IsIngressConfigInUse ¶
func IsIngressConfigInUse(iConfigName, defaultConfigName string, cluster *v1beta1.KafkaCluster, log logr.Logger) bool
IsIngressConfigInUse returns true if the provided ingressConfigName is bound to the given broker
func IsSSLEnabledForInternalCommunication ¶
func IsSSLEnabledForInternalCommunication(l []v1beta1.InternalListenerConfig) (enabled bool)
IsSSLEnabledForInternalCommunication checks if ssl is enabled for internal communication
func MapStringStringPointer ¶
MapStringStringPointer generates a map[string]*string
func ObjectManagedByClusterRegistry ¶ added in v0.21.0
func QuantityPointer ¶
QuantityPointer generates Quantity pointer from Quantity
func RetryOnConflict ¶ added in v0.22.0
func RetryOnError ¶ added in v0.22.0
func ShouldIncludeBroker ¶
func ShouldIncludeBroker(brokerConfig *v1beta1.BrokerConfig, status v1beta1.KafkaClusterStatus, brokerID int, defaultIngressConfigName, ingressConfigName string) bool
ShouldIncludeBroker returns true if the broker should be included as a resource on external listener resources
func StorageConfigKafkaMountPath ¶ added in v0.19.0
func StringPointer ¶
StringPointer generates string pointer from string
func StringSliceContains ¶
StringSliceContains returns true if list contains s
func StringSliceRemove ¶
StringSliceRemove will remove s from list
Types ¶
This section is empty.