File tree Expand file tree Collapse file tree
controller/build/resource Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ pub(crate) async fn build_node_rolegroup_statefulset(
175175 role_group_name : & RoleGroupName ,
176176 rg : & NifiRoleGroupConfig ,
177177 rolling_update_supported : bool ,
178- replicas : Option < i32 > ,
178+ effective_replicas : Option < i32 > ,
179179 service_account_name : & str ,
180180) -> Result < StatefulSet > {
181181 tracing:: debug!( "Building statefulset" ) ;
@@ -675,7 +675,7 @@ pub(crate) async fn build_node_rolegroup_statefulset(
675675 . build ( ) ,
676676 spec : Some ( StatefulSetSpec {
677677 pod_management_policy : Some ( "Parallel" . to_string ( ) ) ,
678- replicas,
678+ replicas : effective_replicas ,
679679 selector : LabelSelector {
680680 match_labels : Some ( cluster. role_group_selector ( role_group_name) . into ( ) ) ,
681681 ..LabelSelector :: default ( )
Original file line number Diff line number Diff line change @@ -301,12 +301,10 @@ pub async fn reconcile_nifi(
301301 rolegroup : role_group_name. clone ( ) ,
302302 } ) ?;
303303
304- let replicas =
304+ let effective_replicas =
305305 if cluster_version_update_state == ClusterVersionUpdateState :: UpdateRequested {
306306 Some ( 0 )
307307 } else {
308- // `None` (HPA-managed role group) is passed straight through to the StatefulSet
309- // so the Horizontal Pod Autoscaler owns the replica count.
310308 rg. replicas . map ( i32:: from)
311309 } ;
312310
@@ -316,7 +314,7 @@ pub async fn reconcile_nifi(
316314 role_group_name,
317315 rg,
318316 rolling_upgrade_supported,
319- replicas ,
317+ effective_replicas ,
320318 & rbac_sa. name_any ( ) ,
321319 )
322320 . await
You can’t perform that action at this time.
0 commit comments