mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
kubenet: define KubenetPluginName for all platforms
This commit is contained in:
parent
f1c8b7581d
commit
25dee7dd83
@ -10,7 +10,10 @@ load(
|
|||||||
|
|
||||||
go_library(
|
go_library(
|
||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = ["kubenet_linux.go"],
|
srcs = [
|
||||||
|
"kubenet.go",
|
||||||
|
"kubenet_linux.go",
|
||||||
|
],
|
||||||
tags = ["automanaged"],
|
tags = ["automanaged"],
|
||||||
deps = [
|
deps = [
|
||||||
"//pkg/api/v1:go_default_library",
|
"//pkg/api/v1:go_default_library",
|
||||||
|
21
pkg/kubelet/network/kubenet/kubenet.go
Normal file
21
pkg/kubelet/network/kubenet/kubenet.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 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 kubenet
|
||||||
|
|
||||||
|
const (
|
||||||
|
KubenetPluginName = "kubenet"
|
||||||
|
)
|
@ -20,15 +20,15 @@ package kubenet
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
"net"
|
"net"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"io/ioutil"
|
|
||||||
|
|
||||||
"github.com/containernetworking/cni/libcni"
|
"github.com/containernetworking/cni/libcni"
|
||||||
cnitypes "github.com/containernetworking/cni/pkg/types"
|
cnitypes "github.com/containernetworking/cni/pkg/types"
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
@ -37,6 +37,7 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/apis/componentconfig"
|
"k8s.io/kubernetes/pkg/apis/componentconfig"
|
||||||
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
|
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
|
||||||
"k8s.io/kubernetes/pkg/kubelet/network"
|
"k8s.io/kubernetes/pkg/kubelet/network"
|
||||||
|
"k8s.io/kubernetes/pkg/kubelet/network/hostport"
|
||||||
"k8s.io/kubernetes/pkg/util/bandwidth"
|
"k8s.io/kubernetes/pkg/util/bandwidth"
|
||||||
utildbus "k8s.io/kubernetes/pkg/util/dbus"
|
utildbus "k8s.io/kubernetes/pkg/util/dbus"
|
||||||
utilebtables "k8s.io/kubernetes/pkg/util/ebtables"
|
utilebtables "k8s.io/kubernetes/pkg/util/ebtables"
|
||||||
@ -46,16 +47,11 @@ import (
|
|||||||
utilnet "k8s.io/kubernetes/pkg/util/net"
|
utilnet "k8s.io/kubernetes/pkg/util/net"
|
||||||
utilsets "k8s.io/kubernetes/pkg/util/sets"
|
utilsets "k8s.io/kubernetes/pkg/util/sets"
|
||||||
utilsysctl "k8s.io/kubernetes/pkg/util/sysctl"
|
utilsysctl "k8s.io/kubernetes/pkg/util/sysctl"
|
||||||
|
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"k8s.io/kubernetes/pkg/kubelet/network/hostport"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
KubenetPluginName = "kubenet"
|
BridgeName = "cbr0"
|
||||||
BridgeName = "cbr0"
|
DefaultCNIDir = "/opt/cni/bin"
|
||||||
DefaultCNIDir = "/opt/cni/bin"
|
|
||||||
|
|
||||||
sysctlBridgeCallIPTables = "net/bridge/bridge-nf-call-iptables"
|
sysctlBridgeCallIPTables = "net/bridge/bridge-nf-call-iptables"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user