Skip to content

Commit

Permalink
address the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Song Gao committed Mar 19, 2020
1 parent 85f0593 commit 79ec81c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/generic_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ func (w *typedWrapper) CreateOrUpdateService(controller runtime.Object, svc *cor
for _, eport := range ports {
// Because the portName could be edited,
// we use Port number to link the desired Service Port and the existed Service Port in the nested loop
if dport.Port == eport.Port {
if dport.Port == eport.Port && dport.Protocol == eport.Protocol {
dport.NodePort = eport.NodePort
existingSvc.Spec.Ports[i] = dport
break
Expand Down
2 changes: 0 additions & 2 deletions pkg/monitor/monitor/monitor_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
type MonitorManager struct {
typedControl controller.TypedControlInterface
deploymentLister appslisters.DeploymentLister
svcLister corelisters.ServiceLister
tcLister v1alpha1listers.TidbClusterLister
pvLister corelisters.PersistentVolumeLister
pvControl controller.PVControlInterface
Expand All @@ -55,7 +54,6 @@ func NewMonitorManager(
return &MonitorManager{
typedControl: typedControl,
deploymentLister: kubeInformerFactory.Apps().V1().Deployments().Lister(),
svcLister: kubeInformerFactory.Core().V1().Services().Lister(),
tcLister: informerFactory.Pingcap().V1alpha1().TidbClusters().Lister(),
pvControl: controller.NewRealPVControl(kubeCli, pvcLister, pvLister, recorder),
pvLister: pvLister,
Expand Down

0 comments on commit 79ec81c

Please sign in to comment.