fix register wrong configz for *-controller-manager

This commit is contained in:
stewart-yu
2018-10-16 17:55:16 +08:00
parent 551501f9a6
commit a2942e5f9c
2 changed files with 6 additions and 2 deletions

View File

@@ -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)