Skip to content

Commit

Permalink
fix bug where NP size is set to 1 always
Browse files Browse the repository at this point in the history
  • Loading branch information
birdayz committed Sep 4, 2024
1 parent 61eef35 commit 171da55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/go/k8s/pkg/resources/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func (r *StatefulSetResource) obj(
clusterReplicas := r.pandaCluster.GetCurrentReplicas()
var replicas int32
if clusterReplicas > 1 {
if nps, ok := r.pandaCluster.Status.NodePools[fmt.Sprintf("%s-%s", r.pandaCluster.Name, r.nodePool.Name)]; ok {
if nps, ok := r.pandaCluster.Status.NodePools[strings.TrimSuffix(fmt.Sprintf("%s-%s", r.pandaCluster.Name, r.nodePool.Name), "-redpanda__imported")]; ok { // FIXME.
replicas = nps.CurrentReplicas
} else {
replicas = *r.nodePool.Replicas
Expand Down

0 comments on commit 171da55

Please sign in to comment.