Skip to content

Commit

Permalink
fix: pg restart failed (#8845)
Browse files Browse the repository at this point in the history
(cherry picked from commit 15563c0)
  • Loading branch information
wangyelei committed Jan 22, 2025
1 parent 238b285 commit 5c482ed
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 @@ -221,11 +221,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 5c482ed

Please sign in to comment.