Documentation ¶
Index ¶
- Constants
- Variables
- func GetMacAddress(ifName string, netns ns.NetNS) (string, error)
- func NewRateLimiter(thro int) *ratelimit
- func Run(pidFilePath string, socketFilePath string, configFilePath string) error
- func SetupVethPair(contVethName, pairName string, mtu int, hostNS ns.NetNS) (net.Interface, net.Interface, error)
- func VethNameForWorkload(workload string) string
- type ClientMgr
- type CmdArgs
- type ENIPlugin
- type ENIService
- type Pool
- type TokenAuth
- type VETHPlugin
Constants ¶
View Source
const ( IPMASQ_CHAIN = "eni-masq" DELEGATE_PLUGIN = "host-local" DELEGATE_CONF = ` { "ipam": { "type": "host-local", "subnet": "%s", "routes": [ { "dst": "0.0.0.0/0" } ] } } ` )
View Source
const K8S_KUBEADM_CONFIGMAP = "kubeadm-config"
View Source
const K8S_KUBEADM_CONFIGMAP_NETWORKING = "MasterConfiguration"
View Source
const K8S_POD_NAMESPACE_ARGS = "K8S_POD_NAMESPACE"
View Source
const K8S_POD_NAME_ARGS = "K8S_POD_NAME"
View Source
const K8S_SYSTEM_NAMESPACE = "kube-system"
View Source
const POD_EGRESS_BANDWIDTH = "k8s.aliyun.com/egress-bandwidth"
View Source
const POD_INGRESS_BANDWIDTH = "k8s.aliyun.com/ingress-bandwidth"
View Source
const POD_NEED_ENI = "k8s.aliyun.com/eni"
Variables ¶
View Source
var KUBERNETES_ALICLOUD_IDENTITY = "Kubernetes.Alicloud"
View Source
var ( LINK_IP = &net.IPNet{ IP: net.IPv4(169, 254, 1, 1), Mask: net.CIDRMask(32, 32), } )
View Source
var ROLE_NAME = "KubernetesMasterRole"
View Source
var TOKEN_RESYNC_PERIOD = 5 * time.Minute
Functions ¶
func NewRateLimiter ¶
func NewRateLimiter(thro int) *ratelimit
func SetupVethPair ¶
func VethNameForWorkload ¶
VethNameForWorkload returns a deterministic veth name for the given Kubernetes workload.
Types ¶
type ClientMgr ¶
type ClientMgr struct {
// contains filtered or unexported fields
}
func NewClientMgr ¶
type ENIService ¶
type ENIService struct {
// contains filtered or unexported fields
}
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) AvailableNics ¶
func (*Pool) RefreshNics ¶
Click to show internal directories.
Click to hide internal directories.