Skip to content

Commit ae6a58b

Browse files
committed
removed redundant parameter
1 parent fc27750 commit ae6a58b

4 files changed

Lines changed: 7 additions & 12 deletions

File tree

rust/operator-binary/src/controller.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,8 @@ pub async fn reconcile_kafka(
433433
}
434434
}
435435

436-
let discovery_cm =
437-
build_discovery_configmap(kafka, kafka, validated_cluster, &bootstrap_listeners)
438-
.context(BuildDiscoveryConfigSnafu)?;
436+
let discovery_cm = build_discovery_configmap(kafka, validated_cluster, &bootstrap_listeners)
437+
.context(BuildDiscoveryConfigSnafu)?;
439438

440439
cluster_resources
441440
.add(client, discovery_cm)

rust/operator-binary/src/controller/build/config_map.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ pub enum Error {
6969
}
7070

7171
/// The rolegroup [`ConfigMap`] configures the rolegroup based on the configuration given by the administrator
72-
#[allow(clippy::too_many_arguments)]
7372
pub fn build_rolegroup_config_map(
7473
kafka: &v1alpha1::KafkaCluster,
7574
validated_cluster: &ValidatedKafkaCluster,

rust/operator-binary/src/discovery.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use stackable_operator::{
55
builder::{configmap::ConfigMapBuilder, meta::ObjectMetaBuilder},
66
crd::listener,
77
k8s_openapi::api::core::v1::ConfigMap,
8-
kube::{Resource, ResourceExt, runtime::reflector::ObjectRef},
8+
kube::{ResourceExt, runtime::reflector::ObjectRef},
99
};
1010

1111
use crate::{
@@ -45,8 +45,7 @@ pub enum Error {
4545
/// Build a discovery [`ConfigMap`] containing information about how to connect to a certain
4646
/// [`v1alpha1::KafkaCluster`].
4747
pub fn build_discovery_configmap(
48-
kafka: &v1alpha1::KafkaCluster,
49-
owner: &impl Resource<DynamicType = ()>,
48+
owner: &v1alpha1::KafkaCluster,
5049
validated_cluster: ValidatedKafkaCluster,
5150
listeners: &[listener::v1alpha1::Listener],
5251
) -> Result<ConfigMap, Error> {
@@ -69,14 +68,14 @@ pub fn build_discovery_configmap(
6968
ConfigMapBuilder::new()
7069
.metadata(
7170
ObjectMetaBuilder::new()
72-
.name_and_namespace(kafka)
71+
.name_and_namespace(owner)
7372
.name(owner.name_unchecked())
7473
.ownerreference_from_resource(owner, None, Some(true))
7574
.with_context(|_| ObjectMissingMetadataForOwnerRefSnafu {
76-
kafka: ObjectRef::from_obj(kafka),
75+
kafka: ObjectRef::from_obj(owner),
7776
})?
7877
.with_recommended_labels(&build_recommended_labels(
79-
kafka,
78+
owner,
8079
KAFKA_CONTROLLER_NAME,
8180
&resolved_product_image.product_version,
8281
&KafkaRole::Broker.to_string(),

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ pub enum Error {
160160
///
161161
/// The [`Pod`](`stackable_operator::k8s_openapi::api::core::v1::Pod`)s are accessible through the corresponding
162162
/// [`Service`](`stackable_operator::k8s_openapi::api::core::v1::Service`) from [`build_rolegroup_service`](`crate::resource::service::build_rolegroup_headless_service`).
163-
#[allow(clippy::too_many_arguments)]
164163
pub fn build_broker_rolegroup_statefulset(
165164
kafka: &v1alpha1::KafkaCluster,
166165
kafka_role: &KafkaRole,
@@ -570,7 +569,6 @@ pub fn build_broker_rolegroup_statefulset(
570569
}
571570

572571
/// The controller rolegroup [`StatefulSet`] runs the rolegroup, as configured by the administrator.
573-
#[allow(clippy::too_many_arguments)]
574572
pub fn build_controller_rolegroup_statefulset(
575573
kafka: &v1alpha1::KafkaCluster,
576574
kafka_role: &KafkaRole,

0 commit comments

Comments
 (0)