commit
a74227e310
|
@ -7,6 +7,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
||||||
"k8s.io/client-go/discovery"
|
"k8s.io/client-go/discovery"
|
||||||
"k8s.io/client-go/dynamic"
|
"k8s.io/client-go/dynamic"
|
||||||
kubeclientset "k8s.io/client-go/kubernetes"
|
kubeclientset "k8s.io/client-go/kubernetes"
|
||||||
|
@ -37,8 +38,6 @@ import (
|
||||||
"github.com/karmada-io/karmada/pkg/util/overridemanager"
|
"github.com/karmada-io/karmada/pkg/util/overridemanager"
|
||||||
"github.com/karmada-io/karmada/pkg/version"
|
"github.com/karmada-io/karmada/pkg/version"
|
||||||
"github.com/karmada-io/karmada/pkg/version/sharedcommand"
|
"github.com/karmada-io/karmada/pkg/version/sharedcommand"
|
||||||
|
|
||||||
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewControllerManagerCommand creates a *cobra.Command object with default parameters
|
// NewControllerManagerCommand creates a *cobra.Command object with default parameters
|
||||||
|
|
|
@ -65,7 +65,7 @@ func NewCmdCordon(cmdOut io.Writer, karmadaConfig KarmadaConfig, cmdStr string)
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewCmdUncordon defines the `cordon` command that mark cluster as schedulable.
|
// NewCmdUncordon defines the `uncordon` command that mark cluster as schedulable.
|
||||||
func NewCmdUncordon(cmdOut io.Writer, karmadaConfig KarmadaConfig, cmdStr string) *cobra.Command {
|
func NewCmdUncordon(cmdOut io.Writer, karmadaConfig KarmadaConfig, cmdStr string) *cobra.Command {
|
||||||
opts := CommandCordonOption{}
|
opts := CommandCordonOption{}
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
|
|
|
@ -15,7 +15,6 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/api/meta"
|
"k8s.io/apimachinery/pkg/api/meta"
|
||||||
"k8s.io/client-go/discovery"
|
"k8s.io/client-go/discovery"
|
||||||
diskcached "k8s.io/client-go/discovery/cached/disk"
|
diskcached "k8s.io/client-go/discovery/cached/disk"
|
||||||
|
|
|
@ -902,6 +902,7 @@ func (s *Scheduler) establishEstimatorConnections() {
|
||||||
clusterList, err := s.KarmadaClient.ClusterV1alpha1().Clusters().List(context.TODO(), metav1.ListOptions{})
|
clusterList, err := s.KarmadaClient.ClusterV1alpha1().Clusters().List(context.TODO(), metav1.ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Errorf("Cannot list all clusters when establish all cluster estimator connections: %v", err)
|
klog.Errorf("Cannot list all clusters when establish all cluster estimator connections: %v", err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
for i := range clusterList.Items {
|
for i := range clusterList.Items {
|
||||||
if err = estimatorclient.EstablishConnection(clusterList.Items[i].Name, s.schedulerEstimatorCache, s.schedulerEstimatorPort); err != nil {
|
if err = estimatorclient.EstablishConnection(clusterList.Items[i].Name, s.schedulerEstimatorCache, s.schedulerEstimatorPort); err != nil {
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package util
|
package util
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/client-go/util/workqueue"
|
|
||||||
"k8s.io/klog/v2"
|
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apimachinery/pkg/util/wait"
|
"k8s.io/apimachinery/pkg/util/wait"
|
||||||
|
"k8s.io/client-go/util/workqueue"
|
||||||
|
"k8s.io/klog/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
Loading…
Reference in New Issue