Skip to content

Commit

Permalink
fix: pg restart failed (#8845)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyelei authored Jan 22, 2025
1 parent 2b312c3 commit 15563c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/controller/instanceset/reconciler_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ func (r *updateReconciler) switchover(tree *kubebuilderx.ObjectTree, its *worklo

clusterName, err := func() (string, error) {
var clusterName string
if its.Annotations != nil {
clusterName = its.Annotations[constant.AppInstanceLabelKey]
if its.Labels != nil {
clusterName = its.Labels[constant.AppInstanceLabelKey]
}
if len(clusterName) == 0 {
return "", fmt.Errorf("InstanceSet %s/%s has no annotation %s", its.Namespace, its.Name, constant.AppInstanceLabelKey)
return "", fmt.Errorf("InstanceSet %s/%s has no label %s", its.Namespace, its.Name, constant.AppInstanceLabelKey)
}
return clusterName, nil

Expand Down

0 comments on commit 15563c0

Please sign in to comment.