mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-30 01:42:48 +00:00 
			
		
		
		
	Multiple scheduler leader election support
This commit is contained in:
		| @@ -72,6 +72,8 @@ func (s *SchedulerServer) AddFlags(fs *pflag.FlagSet) { | ||||
| 	fs.Float32Var(&s.KubeAPIQPS, "kube-api-qps", s.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver") | ||||
| 	fs.Int32Var(&s.KubeAPIBurst, "kube-api-burst", s.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver") | ||||
| 	fs.StringVar(&s.SchedulerName, "scheduler-name", s.SchedulerName, "Name of the scheduler, used to select which pods will be processed by this scheduler, based on pod's \"spec.SchedulerName\".") | ||||
| 	fs.StringVar(&s.LockObjectNamespace, "lock-object-namespace", s.LockObjectNamespace, "Define the namespace of the lock object.") | ||||
| 	fs.StringVar(&s.LockObjectName, "lock-object-name", s.LockObjectName, "Define the name of the lock object.") | ||||
| 	fs.IntVar(&s.HardPodAffinitySymmetricWeight, "hard-pod-affinity-symmetric-weight", api.DefaultHardPodAffinitySymmetricWeight, | ||||
| 		"RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule corresponding "+ | ||||
| 			"to every RequiredDuringScheduling affinity rule. --hard-pod-affinity-symmetric-weight represents the weight of implicit PreferredDuringScheduling affinity rule.") | ||||
|   | ||||
| @@ -113,8 +113,8 @@ func Run(s *options.SchedulerServer) error { | ||||
| 	// TODO: enable other lock types | ||||
| 	rl := &resourcelock.EndpointsLock{ | ||||
| 		EndpointsMeta: metav1.ObjectMeta{ | ||||
| 			Namespace: "kube-system", | ||||
| 			Name:      "kube-scheduler", | ||||
| 			Namespace: s.LockObjectNamespace, | ||||
| 			Name:      s.LockObjectName, | ||||
| 		}, | ||||
| 		Client: kubecli, | ||||
| 		LockConfig: resourcelock.ResourceLockConfig{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Haoran Wang
					Haoran Wang