Skip to content

Commit

Permalink
feat: support fieldSelector
Browse files Browse the repository at this point in the history
Signed-off-by: jwcesign <jwcesign@gmail.com>
  • Loading branch information
jwcesign committed May 28, 2023
1 parent ae6c345 commit 6dfa4d0
Show file tree
Hide file tree
Showing 4 changed files with 267 additions and 61 deletions.
2 changes: 1 addition & 1 deletion cmd/metrics-adapter/app/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (o *Options) Config() (*metricsadapter.MetricsServer, error) {
}

if err := api.Install(metricsAdapter, metricsAdapter.PodLister, metricsAdapter.NodeLister, server.GenericAPIServer, nil); err != nil {
klog.Errorf("unable to install resource metrics adapter: %v", err)
klog.Errorf("Unable to install resource metrics adapter: %v", err)
return nil, err
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/metricsadapter/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (m *MetricsController) updateCluster(oldObj, curObj interface{}) {
m.queue.Add(curCluster.GetName())
}

if util.IsClusterSpecPartCriticalUpdated(curCluster.Spec, oldCluster.Spec) ||
if util.ClusterAccessCredentialChanged(curCluster.Spec, oldCluster.Spec) ||
util.IsClusterReady(&curCluster.Status) != util.IsClusterReady(&oldCluster.Status) {
// Cluster.Spec or Cluster health state is changed, rebuild informer.
m.InformerManager.Stop(curCluster.GetName())
Expand Down
Loading

0 comments on commit 6dfa4d0

Please sign in to comment.