update kube-controller-manager and kube-scheduler to match kube-apiserver defaults

This commit is contained in:
David Eads
2020-02-28 09:23:23 -05:00
parent 7587ab3ef3
commit aa07992a44
6 changed files with 40 additions and 4 deletions

View File

@@ -27,6 +27,16 @@ type DebuggingOptions struct {
*componentbaseconfig.DebuggingConfiguration
}
// RecommendedDebuggingOptions returns the currently recommended debugging options. These are subject to change
// between releases as we add options and decide which features should be exposed or not by default.
func RecommendedDebuggingOptions() *DebuggingOptions {
return &DebuggingOptions{
DebuggingConfiguration: &componentbaseconfig.DebuggingConfiguration{
EnableProfiling: true, // profile debugging is cheap to have exposed and standard on kube binaries
},
}
}
// AddFlags adds flags related to debugging for controller manager to the specified FlagSet.
func (o *DebuggingOptions) AddFlags(fs *pflag.FlagSet) {
if o == nil {

View File

@@ -22,7 +22,6 @@ import (
"k8s.io/apimachinery/pkg/util/sets"
cliflag "k8s.io/component-base/cli/flag"
componentbaseconfig "k8s.io/component-base/config"
"k8s.io/kubernetes/pkg/client/leaderelectionconfig"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config"
)
@@ -39,9 +38,7 @@ type GenericControllerManagerConfigurationOptions struct {
func NewGenericControllerManagerConfigurationOptions(cfg *kubectrlmgrconfig.GenericControllerManagerConfiguration) *GenericControllerManagerConfigurationOptions {
o := &GenericControllerManagerConfigurationOptions{
GenericControllerManagerConfiguration: cfg,
Debugging: &DebuggingOptions{
DebuggingConfiguration: &componentbaseconfig.DebuggingConfiguration{},
},
Debugging: RecommendedDebuggingOptions(),
}
return o