
Following are part of this commit +++++++++++++++++++++++++++++++++ * Windows CNI Support (1) Support to use --network-plugin=cni (2) Handled platform requirement of calling CNI ADD for all the containers. (2.1) For POD Infra container, netNs has to be empty (2.2) For all other containers, sharing the network namespace of POD container, should pass netNS name as "container:<Pod Infra Container Id>", same as the NetworkMode of the current container (2.3) The Windows CNI plugin has to handle this to call into Platform. Sample Windows CNI Plugin code to be shared soon. * Sandbox support for Windows (1) Sandbox support for Windows. Works only with Docker runtime. (2) Retained CONTAINER_NETWORK as a backward compatibilty flag, to not break existing deployments using it. (3) Works only with CNI plugin enabled. (*) Changes to reinvoke CNI ADD for every new container created. This is hooked up with PodStatus, but would be ideal to move it outside of this, once we have CNI GET support
56 lines
1.6 KiB
Go
56 lines
1.6 KiB
Go
// +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 dockershim
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/blang/semver"
|
|
dockertypes "github.com/docker/docker/api/types"
|
|
"github.com/golang/glog"
|
|
runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
|
|
)
|
|
|
|
func DefaultMemorySwap() int64 {
|
|
return -1
|
|
}
|
|
|
|
func (ds *dockerService) getSecurityOpts(seccompProfile string, separator rune) ([]string, error) {
|
|
glog.Warningf("getSecurityOpts is unsupported in this build")
|
|
return nil, nil
|
|
}
|
|
|
|
func (ds *dockerService) updateCreateConfig(
|
|
createConfig *dockertypes.ContainerCreateConfig,
|
|
config *runtimeapi.ContainerConfig,
|
|
sandboxConfig *runtimeapi.PodSandboxConfig,
|
|
podSandboxID string, securityOptSep rune, apiVersion *semver.Version) error {
|
|
glog.Warningf("updateCreateConfig is unsupported in this build")
|
|
return nil
|
|
}
|
|
|
|
func (ds *dockerService) determinePodIPBySandboxID(uid string) string {
|
|
glog.Warningf("determinePodIPBySandboxID is unsupported in this build")
|
|
return ""
|
|
}
|
|
|
|
func getNetworkNamespace(c *dockertypes.ContainerJSON) (string, error) {
|
|
return "", fmt.Errorf("unsupported platform")
|
|
}
|