Skip to content

Commit

Permalink
chore: fix expose ops consensus leader name (apecloud#6443)
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-Rookie authored Jan 12, 2024
1 parent fbc93ae commit a0ed1de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controllers/apps/operations/expose.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ func (e ExposeOpsHandler) buildClusterServices(reqCtx intctrlutil.RequestCtx,
case appsv1alpha1.Replication:
return constant.Primary, nil
case appsv1alpha1.Consensus:
if clusterCompDef.ConsensusSpec != nil {
return clusterCompDef.ConsensusSpec.Leader.Name, nil
}
return constant.Leader, nil
}
}
Expand Down

0 comments on commit a0ed1de

Please sign in to comment.