Skip to content

Commit

Permalink
Fix cloudprovider controller name
Browse files Browse the repository at this point in the history
Looking at metrics revealed the cloudprovider controller name was anempty string.

k8s.io/cloud-provider/names isn't available until 1.28, so just hardcode
it for 1.27. ref: kubernetes/kubernetes#115813

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit bffdf46)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
  • Loading branch information
brandond committed Aug 2, 2024
1 parent 591f912 commit 848126f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/cloudprovider/servicelb.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/util/retry"
ccmapp "k8s.io/cloud-provider/app"
servicehelper "k8s.io/cloud-provider/service/helpers"
utilsnet "k8s.io/utils/net"
utilsptr "k8s.io/utils/ptr"
Expand All @@ -40,7 +39,7 @@ var (
daemonsetNodePoolLabel = "svccontroller." + version.Program + ".cattle.io/lbpool"
nodeSelectorLabel = "svccontroller." + version.Program + ".cattle.io/nodeselector"
priorityAnnotation = "svccontroller." + version.Program + ".cattle.io/priorityclassname"
controllerName = ccmapp.DefaultInitFuncConstructors["service"].InitContext.ClientName
controllerName = "service-lb-controller"
)

const (
Expand Down

0 comments on commit 848126f

Please sign in to comment.