Skip to content

Commit

Permalink
--story=117792797 【集群管理】自研云VPC-CNI网络插件配置 (merge request !1867)
Browse files Browse the repository at this point in the history
Squash merge branch 'fix_vpc_cni' into 'master'
feat: 支持VPC-CNI模式


TAPD: --story=117792797
  • Loading branch information
hitozhang committed Jul 23, 2024
1 parent 868e07e commit aa17916
Show file tree
Hide file tree
Showing 16 changed files with 603 additions and 377 deletions.
5 changes: 5 additions & 0 deletions bcs-ui/frontend/src/api/modules/cluster-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,8 @@ export const hostInfoByHostId = request('post', '/web/scope/$scope/$biz/hosts/de

export const setClusterModule = request('put', '/clusters/$clusterId/module');
export const ccTopology = request('get', '/cluster/$clusterId/cc/topology');

// 启用vpc-cni模式
export const underlayNetwork = request('post', '/clusters/$clusterId/networks/underlay');

export const clusterMeta = request('post', '/clusters/-/meta');
1 change: 1 addition & 0 deletions bcs-ui/frontend/src/components/status-icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default defineComponent({
running: 'green',
completed: 'green',
failed: 'red',
FAILURE: 'red',
terminating: 'blue',
true: 'green',
false: 'red',
Expand Down
3 changes: 3 additions & 0 deletions bcs-ui/frontend/src/composables/use-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export interface ICluster {
serviceIPv4CIDR: string
isStaticIpMode: boolean
eniSubnetIDs: string[]
enableVPCCni: boolean
status: string
networkMode: 'tke-route-eni' | 'tke-direct-eni'
}
master: any
provider: CloudID,
Expand Down
31 changes: 13 additions & 18 deletions bcs-ui/frontend/src/i18n/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,10 @@ generic:
restarting: Restarting
pending: Pending
skip: Skipped
enable: Enabling
enableFailed: Enable failed
disable: Disabling
disableFailed: Disable failed
validate:
repeatKey: Repeat key
required: Requiring item
Expand Down Expand Up @@ -718,7 +722,6 @@ cluster:
text: VPC
deficiencyIpNumTips: The number of available container network IP is insufficient
availableIpNum: 'Number of ip available: {0}'
availableIpNum2: 'Available container network IP {num}'
businessSpecificVPC: Business-specific VPC
publicVPC: Public VPC
networkSetting1:
Expand Down Expand Up @@ -759,21 +762,11 @@ cluster:
expanded, the cluster can be added at most {count}.
networkMode:
text: Network Mode
cni:
route: TKE-ROUTE-ENI
direct: TKE-DIRECT-ENI
overlay:
text: GlobalRoute
desc: >-
The global routing network mode is the global routing capability of
TKE based on the underlying private network (VPC), which realizes
the routing strategy of container network and VPC interoperability.
vpc-cni:
text: Global router with VPC-CNI hybrid mode
desc: >-
The cluster supports the global routing mode and VPC-CNI mode. The
VPC-CNI network mode is a container network capability implemented
by TKE based on CNI and VPC elastic network cards. The VPC-CNI
network mode is similar to cloud-native UNDERLAY network mode. If
you need to use, please contact BlueWhale container assistant
assistance
applyResource: Apply for node resources
useExitHost: Use existing server
index: No.
Expand Down Expand Up @@ -875,6 +868,12 @@ cluster:
quota: Quota
nodeList: Nodes
controlConfig: Control plane
disableVpcCNI:
text: Confirm disable VPC-CNI
p1: 'if it is disabled, you cannot create StatefulSet with fixed Pod IP.'
p2: >-
Please make sure you have deleted all Pods of VPC-CNI mode in the
cluster.
label:
tkeID: TKE Cluster ID
ca:
Expand Down Expand Up @@ -1442,10 +1441,6 @@ cluster:
When the container network resources are overused, the container network
will be automatically expanded. After the expansion, a maximum of
{maxRemainNodesCount} nodes can be added.
article4: >-
The number of container network segments has reached the maximum limit. If
you need to continue expanding the container network, please contact the
container platform administrator.
button:
selectPage: Selected on this page
selectAcrossPage: Cross page
Expand Down
20 changes: 11 additions & 9 deletions bcs-ui/frontend/src/i18n/zh-CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@ generic:
restarting: 重启中
pending: 处理中
skip: 已跳过
enable: 启用中
enableFailed: 开启失败
disable: 禁用中
disableFailed: 禁用失败
validate:
name: 仅支持字母,数字和字符(-),且以字母开头
repeatKey: 重复键
Expand Down Expand Up @@ -655,7 +659,6 @@ cluster:
text: 所属VPC
deficiencyIpNumTips: 可用容器网络IP数量不足
availableIpNum: '可用IP数量: {0}'
availableIpNum2: '可用容器网络 IP {num} 个'
businessSpecificVPC: 业务专属VPC
publicVPC: 公共VPC
networkSetting1:
Expand All @@ -678,15 +681,11 @@ cluster:
article2: '当容器网络资源超额使用时,会触发容器网络自动扩容,扩容后集群最多可以添加 {count} 个节点'
networkMode:
text: 网络模式
cni:
route: 共享网卡模式
direct: 独占网卡模式
overlay:
text: 全局路由模式
desc: >-
全局路由网络模式是TKE基于底层私有网络(VPC)的全局路由能力,实现了容器网络和VPC互访的路由策略,类似云原生的Overlay网络模式
vpc-cni:
text: 全局路由与 VPC-CNI 混合模式
desc: >-
集群同时支持全局路由模式与VPC-CNI模式,VPC-CNI 网络模式是 TKE 基于 CNI 和 VPC
弹性网卡实现的容器网络能力,VPC-CNI网络模式类似云原生的Underlay网络模式,如需使用请联系蓝鲸容器助手协助
applyResource: 申请节点资源
useExitHost: 使用已有服务器
index: 序列
Expand Down Expand Up @@ -748,6 +747,10 @@ cluster:
quota: 配额管理
nodeList: 节点列表
controlConfig: 控制面配置
disableVpcCNI:
text: 确定关闭VPC-CNI模式
p1: 关闭后将不再支持创建固定 Pod IP 的 StatefulSet
p2: 请确保集群内已删除所有 VPC-CNI 模式的Pod
label:
tkeID: TKE集群ID
ca:
Expand Down Expand Up @@ -1163,7 +1166,6 @@ cluster:
article1: 集群就绪后,您可以创建命名空间、推送项目镜像到仓库,然后通过服务配置模板集部署服务。
article2: '当前集群已添加节点数(含Master) {nodes},还可添加节点数 {realRemainNodesCount}。'
article3: '当容器网络资源超额使用时,会触发容器网络自动扩容,扩容后最多可以添加 {maxRemainNodesCount} 个节点。'
article4: 容器网络网段数量已达到最大限制,如需继续扩容容器网络,请联系容器平台管理员。
button:
selectPage: 本页全选
selectAcrossPage: 跨页全选
Expand Down
Loading

0 comments on commit aa17916

Please sign in to comment.