mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
Rename mesos_{scheduler ->}.go, {mesos ->}framework.go
This commit is contained in:
parent
eea8accfd5
commit
d4675f1dc3
@ -15,7 +15,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// CAUTION: If you update code in this file, you may need to also update code
|
// CAUTION: If you update code in this file, you may need to also update code
|
||||||
// in contrib/mesos/cmd/km/k8sm-mesos_scheduler.go
|
// in contrib/mesos/cmd/km/k8sm-scheduler.go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// clone of the upstream cmd/hypercube/k8sm-mesos_scheduler.go
|
// clone of the upstream cmd/hypercube/k8sm-scheduler.go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -475,7 +475,7 @@ func (k *KubernetesMesosExecutor) launchTask(driver bindings.ExecutorDriver, tas
|
|||||||
// TODO(k8s): use Pods interface for binding once clusters are upgraded
|
// TODO(k8s): use Pods interface for binding once clusters are upgraded
|
||||||
// return b.Pods(binding.Namespace).Bind(binding)
|
// return b.Pods(binding.Namespace).Bind(binding)
|
||||||
if pod.Spec.NodeName == "" {
|
if pod.Spec.NodeName == "" {
|
||||||
//HACK(jdef): cloned binding construction from k8s plugin/pkg/scheduler/mesos_scheduler.go
|
//HACK(jdef): cloned binding construction from k8s plugin/pkg/scheduler/scheduler.go
|
||||||
binding := &api.Binding{
|
binding := &api.Binding{
|
||||||
ObjectMeta: api.ObjectMeta{
|
ObjectMeta: api.ObjectMeta{
|
||||||
Namespace: pod.Namespace,
|
Namespace: pod.Namespace,
|
||||||
@ -780,7 +780,7 @@ func (k *KubernetesMesosExecutor) FrameworkMessage(driver bindings.ExecutorDrive
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.Infof("Receives message from framework %v\n", message)
|
log.Infof("Receives message from framework %v\n", message)
|
||||||
//TODO(jdef) master reported a lost task, reconcile this! @see mesos_scheduler.go:handleTaskLost
|
//TODO(jdef) master reported a lost task, reconcile this! @see scheduler.go:handleTaskLost
|
||||||
if strings.HasPrefix(message, messages.TaskLost+":") {
|
if strings.HasPrefix(message, messages.TaskLost+":") {
|
||||||
taskId := message[len(messages.TaskLost)+1:]
|
taskId := message[len(messages.TaskLost)+1:]
|
||||||
if taskId != "" {
|
if taskId != "" {
|
||||||
|
@ -196,7 +196,7 @@ func (s *schedulerPlugin) Run(done <-chan struct{}) {
|
|||||||
go runtime.Until(s.scheduleOne, pluginRecoveryDelay, done)
|
go runtime.Until(s.scheduleOne, pluginRecoveryDelay, done)
|
||||||
}
|
}
|
||||||
|
|
||||||
// hacked from GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/mesos_scheduler.go,
|
// hacked from GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/scheduler.go,
|
||||||
// with the Modeler stuff removed since we don't use it because we have mesos.
|
// with the Modeler stuff removed since we don't use it because we have mesos.
|
||||||
func (s *schedulerPlugin) scheduleOne() {
|
func (s *schedulerPlugin) scheduleOne() {
|
||||||
pod := s.config.NextPod()
|
pod := s.config.NextPod()
|
||||||
|
Loading…
Reference in New Issue
Block a user