2016-11-01 20:01:27 +00:00
|
|
|
// +build !linux,!windows
|
|
|
|
|
|
|
|
/*
|
|
|
|
Copyright 2015 The Kubernetes Authors.
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package cm
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
2017-06-22 17:25:57 +00:00
|
|
|
"k8s.io/api/core/v1"
|
2017-06-22 18:24:23 +00:00
|
|
|
"k8s.io/client-go/tools/record"
|
2017-09-01 17:46:39 +00:00
|
|
|
internalapi "k8s.io/kubernetes/pkg/kubelet/apis/cri"
|
2016-11-01 20:01:27 +00:00
|
|
|
"k8s.io/kubernetes/pkg/kubelet/cadvisor"
|
2017-09-01 17:27:51 +00:00
|
|
|
"k8s.io/kubernetes/pkg/kubelet/cm/cpumanager"
|
2017-09-03 04:56:39 +00:00
|
|
|
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
|
2017-09-01 17:46:39 +00:00
|
|
|
"k8s.io/kubernetes/pkg/kubelet/status"
|
2016-11-01 20:01:27 +00:00
|
|
|
"k8s.io/kubernetes/pkg/util/mount"
|
|
|
|
)
|
|
|
|
|
|
|
|
type unsupportedContainerManager struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
var _ ContainerManager = &unsupportedContainerManager{}
|
|
|
|
|
2017-09-01 17:46:39 +00:00
|
|
|
func (unsupportedContainerManager) Start(_ *v1.Node, _ ActivePodsFunc, _ status.PodStatusProvider, _ internalapi.RuntimeService) error {
|
2016-11-01 20:01:27 +00:00
|
|
|
return fmt.Errorf("Container Manager is unsupported in this build")
|
|
|
|
}
|
|
|
|
|
2016-11-18 20:50:58 +00:00
|
|
|
func (unsupportedContainerManager) SystemCgroupsLimit() v1.ResourceList {
|
|
|
|
return v1.ResourceList{}
|
2016-11-01 20:01:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (unsupportedContainerManager) GetNodeConfig() NodeConfig {
|
|
|
|
return NodeConfig{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (unsupportedContainerManager) GetMountedSubsystems() *CgroupSubsystems {
|
|
|
|
return &CgroupSubsystems{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (unsupportedContainerManager) GetQOSContainersInfo() QOSContainersInfo {
|
|
|
|
return QOSContainersInfo{}
|
|
|
|
}
|
|
|
|
|
2017-02-21 20:10:45 +00:00
|
|
|
func (unsupportedContainerManager) UpdateQOSCgroups() error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2016-11-01 20:01:27 +00:00
|
|
|
func (cm *unsupportedContainerManager) Status() Status {
|
|
|
|
return Status{}
|
|
|
|
}
|
|
|
|
|
2017-02-10 05:14:10 +00:00
|
|
|
func (cm *unsupportedContainerManager) GetNodeAllocatableReservation() v1.ResourceList {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-06-29 02:22:57 +00:00
|
|
|
func (cm *unsupportedContainerManager) GetCapacity() v1.ResourceList {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2016-11-01 20:01:27 +00:00
|
|
|
func (cm *unsupportedContainerManager) NewPodContainerManager() PodContainerManager {
|
|
|
|
return &unsupportedPodContainerManager{}
|
|
|
|
}
|
|
|
|
|
2017-08-22 22:03:47 +00:00
|
|
|
func (cm *unsupportedContainerManager) GetResources(pod *v1.Pod, container *v1.Container, activePods []*v1.Pod) (*kubecontainer.RunContainerOptions, error) {
|
|
|
|
return &kubecontainer.RunContainerOptions{}, nil
|
|
|
|
}
|
|
|
|
|
2017-09-01 17:46:39 +00:00
|
|
|
func (cm *unsupportedContainerManager) InternalContainerLifecycle() InternalContainerLifecycle {
|
2017-09-01 17:27:51 +00:00
|
|
|
return &internalContainerLifecycleImpl{cpumanager.NewFakeManager()}
|
2017-09-01 17:46:39 +00:00
|
|
|
}
|
|
|
|
|
2017-08-22 22:03:47 +00:00
|
|
|
func NewContainerManager(_ mount.Interface, _ cadvisor.Interface, _ NodeConfig, failSwapOn bool, devicePluginEnabled bool, recorder record.EventRecorder) (ContainerManager, error) {
|
2016-11-01 20:01:27 +00:00
|
|
|
return &unsupportedContainerManager{}, nil
|
|
|
|
}
|