Skip to content

Commit 8f3a06a

Browse files
committed
small tweaks
1 parent 85f9c32 commit 8f3a06a

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

rust/operator-binary/src/crd/mod.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,8 @@ impl v1alpha1::KafkaCluster {
254254
})
255255
}
256256

257-
/// List pod descriptors for a given role.
258-
/// If no role is provided, pod descriptors for all roles are listed.
259-
///
257+
/// List pod descriptors for a given role and all it's groups.
258+
/// If no role is provided, pod descriptors for all roles (and all groups) are listed.
260259
/// We try to predict the pods here rather than looking at the current cluster state in order to
261260
/// avoid instance churn.
262261
pub fn pod_descriptors(
@@ -292,8 +291,7 @@ impl v1alpha1::KafkaCluster {
292291
};
293292

294293
// only return descriptors for selected role
295-
if requested_kafka_role.is_none() || &current_role == requested_kafka_role.unwrap()
296-
{
294+
if let Some(current_role) = requested_kafka_role {
297295
for replica in 0..replicas {
298296
pod_descriptors.push(KafkaPodDescriptor {
299297
namespace: namespace.clone(),

rust/operator-binary/src/resource/configmap.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ pub fn build_rolegroup_config_map(
206206
})
207207
}
208208

209+
// Generate the content of both server.properties and controller.properties files.
209210
fn server_properties_file(
210211
kraft_mode: bool,
211212
role: &str,

0 commit comments

Comments
 (0)