@@ -56,15 +56,16 @@ type KafkaClusterSpec struct {
5656 ZKAddresses []string `json:"zkAddresses"`
5757 // ZKPath specifies the ZooKeeper chroot path as part
5858 // of its ZooKeeper connection string which puts its data under some path in the global ZooKeeper namespace.
59- ZKPath string `json:"zkPath,omitempty"`
60- RackAwareness * RackAwareness `json:"rackAwareness,omitempty"`
61- ClusterImage string `json:"clusterImage,omitempty"`
62- ReadOnlyConfig string `json:"readOnlyConfig,omitempty"`
63- ClusterWideConfig string `json:"clusterWideConfig,omitempty"`
64- BrokerConfigGroups map [string ]BrokerConfig `json:"brokerConfigGroups,omitempty"`
65- Brokers []Broker `json:"brokers"`
66- DisruptionBudget DisruptionBudget `json:"disruptionBudget,omitempty"`
67- RollingUpgradeConfig RollingUpgradeConfig `json:"rollingUpgradeConfig"`
59+ ZKPath string `json:"zkPath,omitempty"`
60+ RackAwareness * RackAwareness `json:"rackAwareness,omitempty"`
61+ ClusterImage string `json:"clusterImage,omitempty"`
62+ ClusterMetricsReporterImage string `json:"clusterMetricsReporterImage,omitempty"`
63+ ReadOnlyConfig string `json:"readOnlyConfig,omitempty"`
64+ ClusterWideConfig string `json:"clusterWideConfig,omitempty"`
65+ BrokerConfigGroups map [string ]BrokerConfig `json:"brokerConfigGroups,omitempty"`
66+ Brokers []Broker `json:"brokers"`
67+ DisruptionBudget DisruptionBudget `json:"disruptionBudget,omitempty"`
68+ RollingUpgradeConfig RollingUpgradeConfig `json:"rollingUpgradeConfig"`
6869 // +kubebuilder:validation:Enum=envoy;istioingress
6970 IngressController string `json:"ingressController,omitempty"`
7071 // If true OneBrokerPerNode ensures that each kafka broker will be placed on a different node unless a custom
@@ -133,16 +134,17 @@ type Broker struct {
133134
134135// BrokerConfig defines the broker configuration
135136type BrokerConfig struct {
136- Image string `json:"image,omitempty"`
137- Config string `json:"config,omitempty"`
138- StorageConfigs []StorageConfig `json:"storageConfigs,omitempty"`
139- ServiceAccountName string `json:"serviceAccountName,omitempty"`
140- Resources * corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
141- ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
142- NodeSelector map [string ]string `json:"nodeSelector,omitempty"`
143- Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
144- KafkaHeapOpts string `json:"kafkaHeapOpts,omitempty"`
145- KafkaJVMPerfOpts string `json:"kafkaJvmPerfOpts,omitempty"`
137+ Image string `json:"image,omitempty"`
138+ MetricsReporterImage string `json:"metricsReporterImage,omitempty"`
139+ Config string `json:"config,omitempty"`
140+ StorageConfigs []StorageConfig `json:"storageConfigs,omitempty"`
141+ ServiceAccountName string `json:"serviceAccountName,omitempty"`
142+ Resources * corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
143+ ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
144+ NodeSelector map [string ]string `json:"nodeSelector,omitempty"`
145+ Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
146+ KafkaHeapOpts string `json:"kafkaHeapOpts,omitempty"`
147+ KafkaJVMPerfOpts string `json:"kafkaJvmPerfOpts,omitempty"`
146148 // Override for the default log4j configuration
147149 Log4jConfig string `json:"log4jConfig,omitempty"`
148150 // Custom annotations for the broker pods - e.g.: Prometheus scraping annotations:
@@ -586,6 +588,14 @@ func (kSpec *KafkaClusterSpec) GetClusterImage() string {
586588 return "ghcr.io/banzaicloud/kafka:2.13-2.8.1"
587589}
588590
591+ // GetClusterMetricsReporterImage returns the default container image for Kafka Cluster
592+ func (kSpec * KafkaClusterSpec ) GetClusterMetricsReporterImage () string {
593+ if kSpec .ClusterMetricsReporterImage != "" {
594+ return kSpec .ClusterMetricsReporterImage
595+ }
596+ return kSpec .CruiseControlConfig .GetCCImage ()
597+ }
598+
589599func (cTaskSpec * CruiseControlTaskSpec ) GetDurationMinutes () float64 {
590600 if cTaskSpec .RetryDurationMinutes == 0 {
591601 return 5
0 commit comments