Change:
What would you like to be : Enable profiling by default in the scheduler. We can do this by defaulting the CC flags to true. Why is this needed: It is useful when debugging the performance of a running cluster. API server already enables profiling by default. /sig scheduling /help /milestone v1.17
/assign /remove-help

Discussion:
HardPodAffinitySymmetricWeight: 1, HealthzBindAddress:             "", // defaults empty when not running from config file MetricsBindAddress:             "", // defaults empty when not running from config file <ins> DebuggingConfiguration: componentbaseconfig.DebuggingConfiguration{ EnableProfiling:           true, EnableContentionProfiling: true, }, </ins> LeaderElection: kubeschedulerconfig.KubeSchedulerLeaderElectionConfiguration{ LeaderElectionConfiguration: componentbaseconfig.LeaderElectionConfiguration{ LeaderElect:       true,

HardPodAffinitySymmetricWeight: 1, HealthzBindAddress:             "0.0.0.0:10251", MetricsBindAddress:             "0.0.0.0:10251", <ins> DebuggingConfiguration: componentbaseconfig.DebuggingConfiguration{ EnableProfiling:           true, EnableContentionProfiling: true, }, </ins> LeaderElection: kubeschedulerconfig.KubeSchedulerLeaderElectionConfiguration{ LeaderElectionConfiguration: componentbaseconfig.LeaderElectionConfiguration{ LeaderElect:       true,

HardPodAffinitySymmetricWeight: 1, HealthzBindAddress:             "0.0.0.0:10251", MetricsBindAddress:             "0.0.0.0:10251", <ins> DebuggingConfiguration: componentbaseconfig.DebuggingConfiguration{ EnableProfiling:           true, EnableContentionProfiling: true, }, </ins> LeaderElection: kubeschedulerconfig.KubeSchedulerLeaderElectionConfiguration{ LeaderElectionConfiguration: componentbaseconfig.LeaderElectionConfiguration{ LeaderElect:       false,

val := int64(10) obj.PodMaxBackoffSeconds = &val } <ins> // Enable profiling by default in the scheduler if obj.EnableProfiling == nil { enableProfiling := true obj.EnableProfiling = &enableProfiling } // Enable contention profiling by default if profiling is enabled if *obj.EnableProfiling && obj.EnableContentionProfiling == nil { enableContentionProfiling := true obj.EnableContentionProfiling = &enableContentionProfiling } </ins> }

) func TestSchedulerDefaults(t *testing.T) { <ins> enable := true </ins> tests := []struct { name     string config   *kubeschedulerconfigv1alpha1.KubeSchedulerConfiguration

HardPodAffinitySymmetricWeight: pointer.Int32Ptr(1), HealthzBindAddress:             pointer.StringPtr("0.0.0.0:10251"), MetricsBindAddress:             pointer.StringPtr("0.0.0.0:10251"), <ins> DebuggingConfiguration: componentbaseconfig.DebuggingConfiguration{ EnableProfiling:           &enable, EnableContentionProfiling: &enable, }, </ins> LeaderElection: kubeschedulerconfigv1alpha1.KubeSchedulerLeaderElectionConfiguration{ LeaderElectionConfiguration: componentbaseconfig.LeaderElectionConfiguration{ LeaderElect:       pointer.BoolPtr(true),

HardPodAffinitySymmetricWeight: pointer.Int32Ptr(1), HealthzBindAddress:             pointer.StringPtr("1.2.3.4:10251"), MetricsBindAddress:             pointer.StringPtr("1.2.3.4:10251"), <ins> DebuggingConfiguration: componentbaseconfig.DebuggingConfiguration{ EnableProfiling:           &enable, EnableContentionProfiling: &enable, }, </ins> LeaderElection: kubeschedulerconfigv1alpha1.KubeSchedulerLeaderElectionConfiguration{ LeaderElectionConfiguration: componentbaseconfig.LeaderElectionConfiguration{ LeaderElect:       pointer.BoolPtr(true),

HardPodAffinitySymmetricWeight: pointer.Int32Ptr(1), HealthzBindAddress:             pointer.StringPtr("0.0.0.0:12345"), MetricsBindAddress:             pointer.StringPtr("0.0.0.0:12345"), <ins> DebuggingConfiguration: componentbaseconfig.DebuggingConfiguration{ EnableProfiling:           &enable, EnableContentionProfiling: &enable, }, </ins> LeaderElection: kubeschedulerconfigv1alpha1.KubeSchedulerLeaderElectionConfiguration{ LeaderElectionConfiguration: componentbaseconfig.LeaderElectionConfiguration{ LeaderElect:       pointer.BoolPtr(true),