mirror of https://github.com/k3s-io/k3s
Merge pull request #69863 from stewart-yu/stewart-cloud-controller-manager-clean
fix register wrong configz for *-controller-managerpull/58/head
commit
1af76aee9a
|
@ -50,6 +50,8 @@ import (
|
|||
const (
|
||||
// ControllerStartJitter is the jitter value used when starting controller managers.
|
||||
ControllerStartJitter = 1.0
|
||||
// ConfigzName is the name used for register cloud-controller manager /configz, same with GroupName.
|
||||
ConfigzName = "cloudcontrollermanager.config.k8s.io"
|
||||
)
|
||||
|
||||
// NewCloudControllerManagerCommand creates a *cobra.Command object with default parameters
|
||||
|
@ -123,7 +125,7 @@ func Run(c *cloudcontrollerconfig.CompletedConfig, stopCh <-chan struct{}) error
|
|||
}
|
||||
|
||||
// setup /configz endpoint
|
||||
if cz, err := configz.New("componentconfig"); err == nil {
|
||||
if cz, err := configz.New(ConfigzName); err == nil {
|
||||
cz.Set(c.ComponentConfig)
|
||||
} else {
|
||||
glog.Errorf("unable to register configz: %c", err)
|
||||
|
|
|
@ -64,6 +64,8 @@ import (
|
|||
const (
|
||||
// Jitter used when starting controller managers
|
||||
ControllerStartJitter = 1.0
|
||||
// ConfigzName is the name used for register kube-controller manager /configz, same with GroupName.
|
||||
ConfigzName = "kubecontrollermanager.config.k8s.io"
|
||||
)
|
||||
|
||||
type ControllerLoopMode int
|
||||
|
@ -142,7 +144,7 @@ func Run(c *config.CompletedConfig, stopCh <-chan struct{}) error {
|
|||
// To help debugging, immediately log version
|
||||
glog.Infof("Version: %+v", version.Get())
|
||||
|
||||
if cfgz, err := configz.New("componentconfig"); err == nil {
|
||||
if cfgz, err := configz.New(ConfigzName); err == nil {
|
||||
cfgz.Set(c.ComponentConfig)
|
||||
} else {
|
||||
glog.Errorf("unable to register configz: %c", err)
|
||||
|
|
Loading…
Reference in New Issue