cce-network-v2

module
v0.0.0-...-686bfca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2024 License: Apache-2.0

README

IPAM 开发文档

目录结构

.
|-- api # agent和operator对外api结构
|-- cmd # ipam 可执行程序
|   |-- agent # ipam agent主程序
|   |-- pcb-ipam # 私有云底座ipam cni插件
|   |-- pcb-macvlan # 私有云底座 macvlan 插件,仅用于测试
|   `-- webhook # ipam 固定IP webhook
|-- deploy # 部署工具
|   |-- dockerfile # dockerfile目录
|   `-- private-cloud-base-ipam # 私有云底座 ipam helm
|-- docs # 文档
|-- hack # 代码生成工具
|-- operator # ipam operator可执行程序
|   |-- api # agent和operator对外api结构
|   |-- cmd # 可执行二进制
|   |-- metrics
|   |-- option
|   `-- watchers # operator 对apiserver的监听器
|-- output # 编译输出
|-- pkg
|   |-- addressing
|   |-- alibabacloud
|   |-- annotation
|   |-- api
|   |-- aws
|   |-- azure
|   |-- backoff
|   |-- byteorder
|   |-- checker
|   |-- cidr
|   |-- cleanup
|   |-- client
|   |-- cni
|   |-- command
|   |-- common
|   |-- comparator
|   |-- completion
|   |-- components
|   |-- controller # 定时任务管理器
|   |-- counter
|   |-- datapath
|   |-- debug
|   |-- defaults
|   |-- endpoint # cep 核心对象处理包
|   |-- eventqueue
|   |-- flowdebug
|   |-- health
|   |-- inctimer
|   |-- ip
|   |-- ipam # 与厂商无关的 ipam 动态IP分配核心代码
|   |-- k8s # 与k8s交互的统一客户端和infomer代码. 自定义CRD的定义和client也在这个包下
|   |-- lock
|   |-- logging
|   |-- mac
|   |-- math
|   |-- metrics
|   |-- mtu
|   |-- netns
|   |-- node
|   |-- nodediscovery
|   |-- option
|   |-- pidfile
|   |-- pprof
|   |-- privatecloudbase # 私有云底座相关实现
|   |-- rand
|   |-- rate
|   |-- revert
|   |-- safetime
|   |-- serializer
|   |-- set
|   |-- spanstat
|   |-- status
|   |-- sysctl
|   |-- testutils
|   |-- trigger
|   |-- types
|   |-- u8proto
|   |-- version # 软件版本信息,通过go build参数设置
|   |-- versioncheck
|   `-- webhook 
|-- state
`-- tools

编译

配置

编译前应指定软件版本,定义软件版本的方法是手动在 VERSION 文件中写入版本号.例如: echo 1.0.0 > VERSION

如何构建并推送镜像

make build docker

上面的命令可以把相关二进制推送到cce的插件镜像仓库,镜像的版本号是 VERSION 文件中指定的版本号.

Directories

Path Synopsis
api
v1/health/server
Package server CCE-Health API
Package server CCE-Health API
v1/models
Package models defines all models to be used in the CCE API.
Package models defines all models to be used in the CCE API.
v1/operator/server
Package server CCE Operator
Package server CCE Operator
v1/server
Package server Cce API
Package server Cce API
cmd
agent/cmd
* Copyright (c) 2023 Baidu, Inc.
* Copyright (c) 2023 Baidu, Inc.
webhook/webhook/podmutating
* Copyright (c) 2023 Baidu, Inc.
* Copyright (c) 2023 Baidu, Inc.
api
cmd
pkg
api
Package api provides the CCE useful helpers for the external API
Package api provides the CCE useful helpers for the external API
bce/api
+k8s:deepcopy-gen=package +deepequal-gen=package
+k8s:deepcopy-gen=package +deepequal-gen=package
bce/api/cloud
* Copyright (c) 2023 Baidu, Inc.
* Copyright (c) 2023 Baidu, Inc.
bce/api/cloud/testing
Package testing is a generated GoMock package.
Package testing is a generated GoMock package.
bce/api/metadata/testing
Package mock_metadata is a generated GoMock package.
Package mock_metadata is a generated GoMock package.
bce/option
* Copyright (c) 2023 Baidu, Inc.
* Copyright (c) 2023 Baidu, Inc.
bce/vpceni
* Copyright (c) 2023 Baidu, Inc.
* Copyright (c) 2023 Baidu, Inc.
bce/vpcroute
* Copyright (c) 2023 Baidu, Inc.
* Copyright (c) 2023 Baidu, Inc.
command/exec
Package exec provides useful wrappers around the standard "exec" library.
Package exec provides useful wrappers around the standard "exec" library.
controller
Package controller provide a simple pattern for async operations that require retries and/or regular intervals.
Package controller provide a simple pattern for async operations that require retries and/or regular intervals.
counter
Package counter provides generic reference counter objects
Package counter provides generic reference counter objects
endpoint
* Copyright (c) 2023 Baidu, Inc.
* Copyright (c) 2023 Baidu, Inc.
endpoint/ewebhook
* Copyright (c) 2023 Baidu, Inc.
* Copyright (c) 2023 Baidu, Inc.
eventqueue
Package eventqueue implements a queue-based system for event processing in a generic fashion in a first-in, first-out manner.
Package eventqueue implements a queue-based system for event processing in a generic fashion in a first-in, first-out manner.
ip
Package ip is a library for performing manipulations on IPv4 and IPv6 addresses and CIDR prefixes.
Package ip is a library for performing manipulations on IPv4 and IPv6 addresses and CIDR prefixes.
ipam
Package ipam handles address allocation management
Package ipam handles address allocation management
ipam/types
+groupName=ipam
+groupName=ipam
k8s
Package k8s abstracts all Kubernetes specific behaviour
Package k8s abstracts all Kubernetes specific behaviour
k8s/apis/cce.baidubce.com/v1
v1 版本的api包
v1 版本的api包
k8s/apis/cce.baidubce.com/v2
* Copyright (c) 2023 Baidu, Inc.
* Copyright (c) 2023 Baidu, Inc.
k8s/client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
k8s/client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
k8s/client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
k8s/client/clientset/versioned/typed/cce.baidubce.com/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
k8s/client/clientset/versioned/typed/cce.baidubce.com/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
k8s/client/clientset/versioned/typed/cce.baidubce.com/v2
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
k8s/client/clientset/versioned/typed/cce.baidubce.com/v2/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
k8s/client/clientset/versioned/typed/cce.baidubce.com/v2alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
k8s/client/clientset/versioned/typed/cce.baidubce.com/v2alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
k8s/synced
Package synced provides tools for tracking if k8s resources have been initially sychronized with the k8s apiserver.
Package synced provides tools for tracking if k8s resources have been initially sychronized with the k8s apiserver.
k8s/types
Package types contains slimmer versions of k8s types.
Package types contains slimmer versions of k8s types.
k8s/utils
* Copyright (c) 2023 Baidu, Inc.
* Copyright (c) 2023 Baidu, Inc.
k8s/version
Package version keeps track of the Kubernetes version the client is connected to
Package version keeps track of the Kubernetes version the client is connected to
k8s/watchers/resources
This package contains exported resource identifiers and metric resource labels related to K8s watchers.
This package contains exported resource identifiers and metric resource labels related to K8s watchers.
k8s/watchers/subscriber
Package subscriber implements a mechanism to represent K8s watcher subscribers and allows K8s events to objects / resources to notify their respective subscribers.
Package subscriber implements a mechanism to represent K8s watcher subscribers and allows K8s events to objects / resources to notify their respective subscribers.
logging/logfields
Package logfields defines common logging fields which are used across packages
Package logfields defines common logging fields which are used across packages
mac
metrics
Package metrics holds prometheus metrics objects and related utility functions.
Package metrics holds prometheus metrics objects and related utility functions.
mtu
Package mtu is a library for tracking and configuring MTU for devices and routes.
Package mtu is a library for tracking and configuring MTU for devices and routes.
netns
Package netns contains various utility functions to work with network namespaces
Package netns contains various utility functions to work with network namespaces
node
Package node provides functionality related to the local and remote node addresses
Package node provides functionality related to the local and remote node addresses
os
pprof
Package pprof enables use of pprof in CCE
Package pprof enables use of pprof in CCE
privatecloudbase/api
+k8s:deepcopy-gen=package,register +deepequal-gen=package
+k8s:deepcopy-gen=package,register +deepequal-gen=package
pststrategy
* Copyright (c) 2023 Baidu, Inc.
* Copyright (c) 2023 Baidu, Inc.
rate
Package rate provides a rate limiter to rate limit requests that can be burstable but they should only allowed N per a period defined.
Package rate provides a rate limiter to rate limit requests that can be burstable but they should only allowed N per a period defined.
safetime
Package safetime contains a wrapper function for time.Since to deal with negative durations.
Package safetime contains a wrapper function for time.Since to deal with negative durations.
set
Package set contains a function for performing a subset check for slices.
Package set contains a function for performing a subset check for slices.
spanstat
Package spanstat provides a mechanism to measure duration of multiple spans and add them up to a total duration
Package spanstat provides a mechanism to measure duration of multiple spans and add them up to a total duration
sysctl
Package sysctl allows to change kernel parameters at runtime.
Package sysctl allows to change kernel parameters at runtime.
trigger
Package trigger provides a mechanism to trigger actions that require to be serialized while providing a non-blocking notification mechanism
Package trigger provides a mechanism to trigger actions that require to be serialized while providing a non-blocking notification mechanism
versioncheck
Package versioncheck provides utility wrappers for go-version, allowing the constraints to be used as global variables.
Package versioncheck provides utility wrappers for go-version, allowing the constraints to be used as global variables.
plugins
cptp
* Copyright (c) 2023 Baidu, Inc.
* Copyright (c) 2023 Baidu, Inc.
endpoint-probe
This is the Source Based Routing plugin that sets up source based routing.
This is the Source Based Routing plugin that sets up source based routing.
sbr-eip
This is the Source Based Routing plugin that sets up source based routing.
This is the Source Based Routing plugin that sets up source based routing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL