@@ -141,36 +141,13 @@ pub mod versioned {
141
141
}
142
142
}
143
143
144
- #[ derive( Clone , Deserialize , Debug , Eq , JsonSchema , PartialEq , Serialize ) ]
145
- #[ serde( rename_all = "camelCase" ) ]
146
- pub struct KafkaClusterConfig {
147
- /// Authentication class settings for Kafka like mTLS authentication.
148
- #[ serde( default ) ]
149
- pub authentication : Vec < KafkaAuthentication > ,
150
-
151
- /// Authorization settings for Kafka like OPA.
152
- #[ serde( default ) ]
153
- pub authorization : KafkaAuthorization ,
154
-
155
- /// TLS encryption settings for Kafka (server, internal).
156
- #[ serde(
157
- default = "tls::default_kafka_tls" ,
158
- skip_serializing_if = "Option::is_none"
159
- ) ]
160
- pub tls : Option < KafkaTls > ,
161
-
162
- /// Name of the Vector aggregator [discovery ConfigMap](DOCS_BASE_URL_PLACEHOLDER/concepts/service_discovery).
163
- /// It must contain the key `ADDRESS` with the address of the Vector aggregator.
164
- /// Follow the [logging tutorial](DOCS_BASE_URL_PLACEHOLDER/tutorials/logging-vector-aggregator)
165
- /// to learn how to configure log aggregation with Vector.
166
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
167
- pub vector_aggregator_config_map_name : Option < String > ,
168
-
169
- /// Kafka requires a ZooKeeper cluster connection to run.
170
- /// Provide the name of the ZooKeeper [discovery ConfigMap](DOCS_BASE_URL_PLACEHOLDER/concepts/service_discovery)
171
- /// here. When using the [Stackable operator for Apache ZooKeeper](DOCS_BASE_URL_PLACEHOLDER/zookeeper/)
172
- /// to deploy a ZooKeeper cluster, this will simply be the name of your ZookeeperCluster resource.
173
- pub zookeeper_config_map_name : String ,
144
+ impl HasStatusCondition for v1alpha1:: KafkaCluster {
145
+ fn conditions ( & self ) -> Vec < ClusterCondition > {
146
+ match & self . status {
147
+ Some ( status) => status. conditions . clone ( ) ,
148
+ None => vec ! [ ] ,
149
+ }
150
+ }
174
151
}
175
152
176
153
impl v1alpha1:: KafkaCluster {
@@ -280,6 +257,38 @@ impl v1alpha1::KafkaCluster {
280
257
}
281
258
}
282
259
260
+ #[ derive( Clone , Deserialize , Debug , Eq , JsonSchema , PartialEq , Serialize ) ]
261
+ #[ serde( rename_all = "camelCase" ) ]
262
+ pub struct KafkaClusterConfig {
263
+ /// Authentication class settings for Kafka like mTLS authentication.
264
+ #[ serde( default ) ]
265
+ pub authentication : Vec < KafkaAuthentication > ,
266
+
267
+ /// Authorization settings for Kafka like OPA.
268
+ #[ serde( default ) ]
269
+ pub authorization : KafkaAuthorization ,
270
+
271
+ /// TLS encryption settings for Kafka (server, internal).
272
+ #[ serde(
273
+ default = "tls::default_kafka_tls" ,
274
+ skip_serializing_if = "Option::is_none"
275
+ ) ]
276
+ pub tls : Option < KafkaTls > ,
277
+
278
+ /// Name of the Vector aggregator [discovery ConfigMap](DOCS_BASE_URL_PLACEHOLDER/concepts/service_discovery).
279
+ /// It must contain the key `ADDRESS` with the address of the Vector aggregator.
280
+ /// Follow the [logging tutorial](DOCS_BASE_URL_PLACEHOLDER/tutorials/logging-vector-aggregator)
281
+ /// to learn how to configure log aggregation with Vector.
282
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
283
+ pub vector_aggregator_config_map_name : Option < String > ,
284
+
285
+ /// Kafka requires a ZooKeeper cluster connection to run.
286
+ /// Provide the name of the ZooKeeper [discovery ConfigMap](DOCS_BASE_URL_PLACEHOLDER/concepts/service_discovery)
287
+ /// here. When using the [Stackable operator for Apache ZooKeeper](DOCS_BASE_URL_PLACEHOLDER/zookeeper/)
288
+ /// to deploy a ZooKeeper cluster, this will simply be the name of your ZookeeperCluster resource.
289
+ pub zookeeper_config_map_name : String ,
290
+ }
291
+
283
292
/// Reference to a single `Pod` that is a component of a [`KafkaCluster`]
284
293
///
285
294
/// Used for service discovery.
@@ -528,15 +537,6 @@ pub struct KafkaClusterStatus {
528
537
pub conditions : Vec < ClusterCondition > ,
529
538
}
530
539
531
- impl HasStatusCondition for v1alpha1:: KafkaCluster {
532
- fn conditions ( & self ) -> Vec < ClusterCondition > {
533
- match & self . status {
534
- Some ( status) => status. conditions . clone ( ) ,
535
- None => vec ! [ ] ,
536
- }
537
- }
538
- }
539
-
540
540
#[ cfg( test) ]
541
541
mod tests {
542
542
use super :: * ;
0 commit comments