Scheduler can recieve its policy configuration from a ConfigMap

This commit is contained in:
Bobby Salamat
2017-03-22 17:26:39 -07:00
parent 854441643f
commit d1bc320b44
7 changed files with 266 additions and 22 deletions

View File

@@ -599,6 +599,16 @@ type KubeSchedulerConfiguration struct {
LockObjectNamespace string
// LockObjectName defines the lock object name
LockObjectName string
// PolicyConfigMapName is the name of the ConfigMap object that specifies
// the scheduler's policy config. If UseLegacyPolicyConfig is true, scheduler
// uses PolicyConfigFile. If UseLegacyPolicyConfig is false and
// PolicyConfigMapName is not empty, the ConfigMap object with this name must
// exist in the default system namespace ("kube-system") before scheduler
// initialization.
PolicyConfigMapName string
// UseLegacyPolicyConfig tells the scheduler to ignore Policy ConfigMap and
// to use PolicyConfigFile if available.
UseLegacyPolicyConfig bool
}
// LeaderElectionConfiguration defines the configuration of leader election

View File

@@ -134,6 +134,16 @@ type KubeSchedulerConfiguration struct {
LockObjectNamespace string `json:"lockObjectNamespace"`
// LockObjectName defines the lock object name
LockObjectName string `json:"lockObjectName"`
// PolicyConfigMapName is the name of the ConfigMap object that specifies
// the scheduler's policy config. If UseLegacyPolicyConfig is true, scheduler
// uses PolicyConfigFile. If UseLegacyPolicyConfig is false and
// PolicyConfigMapName is not empty, the ConfigMap object with this name must
// exist in the default system namespace ("kube-system") before scheduler
// initialization.
PolicyConfigMapName string `json:"policyConfigMapName"`
// UseLegacyPolicyConfig tells the scheduler to ignore Policy ConfigMap and
// to use PolicyConfigFile if available.
UseLegacyPolicyConfig bool `json:"useLegacyPolicyConfig"`
}
// HairpinMode denotes how the kubelet should configure networking to handle