Documentation ¶
Index ¶
- Constants
- Variables
- func Run(pidFilePath string, socketFilePath string, debugSocketListen string, ...) error
- func RunDebugServer(debugSocketListen string) error
- type ENI
- type ENIFactory
- type ENIIP
- type ENIIPFactory
- type ENIIPResourceManager
- func (m *ENIIPResourceManager) Allocate(ctx *NetworkContext, prefer string) (types.NetworkResource, error)
- func (m *ENIIPResourceManager) GarbageCollection(inUseSet map[string]interface{}, expireResSet map[string]interface{}) error
- func (m *ENIIPResourceManager) Release(context *NetworkContext, resId string) error
- type ENIResourceManager
- func (m *ENIResourceManager) Allocate(ctx *NetworkContext, prefer string) (types.NetworkResource, error)
- func (m *ENIResourceManager) GarbageCollection(inUseSet map[string]interface{}, expireResSet map[string]interface{}) error
- func (m *ENIResourceManager) Release(context *NetworkContext, resId string) error
- type Kubernetes
- type NetworkContext
- type NullResourceManager
- type PodResources
- type ResourceItem
- type ResourceManager
- func NewENIIPResourceManager(poolConfig *types.PoolConfig, ecs aliyun.ECS, allocatedResources []string) (ResourceManager, error)
- func NewENIResourceManager(poolConfig *types.PoolConfig, ecs aliyun.ECS, allocatedResource []string) (ResourceManager, error)
- func NewVPCResourceManager() (ResourceManager, error)
- type VethResourceManager
- func (*VethResourceManager) Allocate(context *NetworkContext, prefer string) (types.NetworkResource, error)
- func (f *VethResourceManager) GarbageCollection(inUseSet map[string]interface{}, expireResSet map[string]interface{}) error
- func (*VethResourceManager) Release(context *NetworkContext, resId string) error
Constants ¶
View Source
const ( DaemonModeVPC = "VPC" DaemonModeENIMultiIP = "ENIMultiIP" )
View Source
const ( PodNetworkTypeVPCIP = "VPCIP" PodNetworkTypeVPCENI = "VPCENI" PodNetworkTypeENIMultiIP = "ENIMultiIP" DBPath = "/var/lib/cni/terway/pod.db" DBName = "pods" )
View Source
const ( BYTE = 1 << (10 * iota) KILOBYTE MEGABYTE GIGABYTE TERABYTE )
View Source
const ( ResDBPath = "/var/lib/cni/terway/ResRelation.db" ResDBName = "relation" )
View Source
const K8S_KUBEADM_CONFIGMAP = "kubeadm-config"
View Source
const K8S_KUBEADM_CONFIGMAP_ClusterConfiguration = "ClusterConfiguration"
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 StorageCleanPeriod = 1 * time.Hour
Functions ¶
func RunDebugServer ¶ added in v1.0.10
Types ¶
type ENIFactory ¶ added in v1.0.10
type ENIFactory struct {
// contains filtered or unexported fields
}
func NewENIFactory ¶ added in v1.0.10
func NewENIFactory(poolConfig *types.PoolConfig, ecs aliyun.ECS) (*ENIFactory, error)
func (*ENIFactory) Create ¶ added in v1.0.10
func (f *ENIFactory) Create() (types.NetworkResource, error)
func (*ENIFactory) Dispose ¶ added in v1.0.10
func (f *ENIFactory) Dispose(resource types.NetworkResource) error
type ENIIPFactory ¶ added in v1.0.10
func (*ENIIPFactory) Create ¶ added in v1.0.10
func (f *ENIIPFactory) Create() (ip types.NetworkResource, err error)
func (*ENIIPFactory) Dispose ¶ added in v1.0.10
func (f *ENIIPFactory) Dispose(res types.NetworkResource) (err error)
type ENIIPResourceManager ¶ added in v1.0.10
type ENIIPResourceManager struct {
// contains filtered or unexported fields
}
func (*ENIIPResourceManager) Allocate ¶ added in v1.0.10
func (m *ENIIPResourceManager) Allocate(ctx *NetworkContext, prefer string) (types.NetworkResource, error)
func (*ENIIPResourceManager) GarbageCollection ¶ added in v1.0.10
func (m *ENIIPResourceManager) GarbageCollection(inUseSet map[string]interface{}, expireResSet map[string]interface{}) error
func (*ENIIPResourceManager) Release ¶ added in v1.0.10
func (m *ENIIPResourceManager) Release(context *NetworkContext, resId string) error
type ENIResourceManager ¶ added in v1.0.10
type ENIResourceManager struct {
// contains filtered or unexported fields
}
func (*ENIResourceManager) Allocate ¶ added in v1.0.10
func (m *ENIResourceManager) Allocate(ctx *NetworkContext, prefer string) (types.NetworkResource, error)
func (*ENIResourceManager) GarbageCollection ¶ added in v1.0.10
func (m *ENIResourceManager) GarbageCollection(inUseSet map[string]interface{}, expireResSet map[string]interface{}) error
func (*ENIResourceManager) Release ¶ added in v1.0.10
func (m *ENIResourceManager) Release(context *NetworkContext, resId string) error
type Kubernetes ¶ added in v1.0.10
type NetworkContext ¶ added in v1.0.10
func (*NetworkContext) Log ¶ added in v1.0.10
func (networkContext *NetworkContext) Log() *logrus.Entry
type NullResourceManager ¶ added in v1.0.10
type NullResourceManager struct { }
func (NullResourceManager) Allocate ¶ added in v1.0.10
func (NullResourceManager) Allocate(context *NetworkContext, prefer string) (types.NetworkResource, error)
func (NullResourceManager) GarbageCollection ¶ added in v1.0.10
func (NullResourceManager) GarbageCollection(inUseResList []string, expireResList []string) error
func (NullResourceManager) Release ¶ added in v1.0.10
func (NullResourceManager) Release(context *NetworkContext, resId string) error
type PodResources ¶ added in v1.0.10
type PodResources struct { Resources []ResourceItem PodInfo *podInfo // contains filtered or unexported fields }
func (PodResources) GetResourceItemByType ¶ added in v1.0.10
func (p PodResources) GetResourceItemByType(resType string) []ResourceItem
type ResourceItem ¶ added in v1.0.10
type ResourceManager ¶ added in v1.0.10
type ResourceManager interface { Allocate(context *NetworkContext, prefer string) (types.NetworkResource, error) Release(context *NetworkContext, resId string) error GarbageCollection(inUseResList map[string]interface{}, expireResList map[string]interface{}) error }
ResourceManager Allocate/Release/Pool/Stick/GC pod resource managed pod and resource relationship
func NewENIIPResourceManager ¶ added in v1.0.10
func NewENIIPResourceManager(poolConfig *types.PoolConfig, ecs aliyun.ECS, allocatedResources []string) (ResourceManager, error)
func NewENIResourceManager ¶ added in v1.0.10
func NewENIResourceManager(poolConfig *types.PoolConfig, ecs aliyun.ECS, allocatedResource []string) (ResourceManager, error)
func NewVPCResourceManager ¶ added in v1.0.10
func NewVPCResourceManager() (ResourceManager, error)
type VethResourceManager ¶ added in v1.0.10
type VethResourceManager struct {
// contains filtered or unexported fields
}
func (*VethResourceManager) Allocate ¶ added in v1.0.10
func (*VethResourceManager) Allocate(context *NetworkContext, prefer string) (types.NetworkResource, error)
func (*VethResourceManager) GarbageCollection ¶ added in v1.0.10
func (f *VethResourceManager) GarbageCollection(inUseSet map[string]interface{}, expireResSet map[string]interface{}) error
func (*VethResourceManager) Release ¶ added in v1.0.10
func (*VethResourceManager) Release(context *NetworkContext, resId string) error
Click to show internal directories.
Click to hide internal directories.