apache / apache/cloudstack

Provide a global setting to set the default network offering for Differnet network types ( L2/Isolated/Shared)

未關閉
#12,705 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
complexity:unknown component:advanced-networking component:basic-network component:networking no-issue-activity type:improvement
主要語言
Java
星號
3.1k
分支
1.4k
平均合併
6 天 19 小時
30 天內合併 PR
32

描述

### The required feature described as a wish

Currently, there is a global setting "cloud.kubernetes.cluster.network.offering" which is set to "DefaultNetworkOfferingforKubernetesService".

When a user executes the api (createKubernetesCluster) and doesn't provide a network, cloudstack uses the global setting value to automatically create a network based on the network offering

https://cloudstack.apache.org/api/apidocs-4.22/apis/createKubernetesCluster.html

Similarly, when a user executes the deployVirtualMachine api call , cloudstack uses the offerings mentioned in the sql query to launch vm based on the network offering

https://cloudstack.apache.org/api/apidocs-4.22/apis/deployVirtualMachine.html

deploy virtualmachine serviceofferingid=<> templateid=<> zoneid=<>

```
mysql> SELECT id, name, display_text, `default`, for_vpc FROM cloud.network_offerings WHERE availability = 'Required' AND system_only = 0;
+----+----------------------------------------------------+----------------------------------------------------------------+---------+---------+
| id | name | display_text | default | for_vpc |
+----+----------------------------------------------------+----------------------------------------------------------------+---------+---------+
| 10 | DefaultIsolatedNetworkOfferingWithSourceNatService | Offering for Isolated networks with Source Nat service enabled | 1 | 0 |
| 28 | DefaultNetworkOfferingforKubernetesService | Network Offering used for CloudStack Kubernetes service | 1 | 0 |
| 29 | DefaultNSXNetworkOfferingforKubernetesService | Network Offering for NSX CloudStack Kubernetes Service | 1 | 0 |
| 30 | DefaultNSXVPCNetworkOfferingforKubernetesService | Network Offering for NSX CloudStack Kubernetes service on VPC | 1 | 1 |
+----+----------------------------------------------------+----------------------------------------------------------------+---------+---------+
4 rows in set (0.01 sec)

```

Now if a Admin user wants to use differnet network offering as the default, he has to first mark all the offerings mentioned in the sql query as optional

Image

Next, he has to make sure the newly created network offering as Required

Image

```
mysql> SELECT id, name, display_text, `default`, for_vpc FROM cloud.network_offerings WHERE availability = 'Required' AND system_only = 0;
+----+------+--------------+---------+---------+
| id | name | display_text | default | for_vpc |
+----+------+--------------+---------+---------+
| 31 | test | test | 0 | 0 |
+----+------+--------------+---------+---------+
1 row in set (0.00 sec)

```

It's a tedious process and i think if CloudStack can have default global setting for each network type it would be beneficial from admin and

users who doesn't want to provide the network id during vm deployment and let cloudstack handle the network creation part

Default.isolated.network.offering
Default.shared.network.offering
Default.l2.network.offering
Default.vpc.network.offering
Default.shared.network.offering
Default.nsx.network.offering
Default.netris.network.offering

Ref

https://github.com/apache/cloudstack/issues/12116#issuecomment-3576829083

貢獻指南

開啟貢獻指南

研究方向

從 createKubernetesCluster 和 deployVirtualMachine API 路徑、現有的 cloud.kubernetes.cluster.network.offering 設定,以及 issue 中所示的 cloud.network_offerings 查詢開始。確定 isolated、shared、L2、VPC、NSX 和 Netris 網路的預設值如何選取。完成的標準是:管理員可以設定不同的全域預設值,而不必手動變更 offering 的可用性,且兩個 API 流程都使用相應的已設定預設值。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
backend-api-design, cloud, networking
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
冷清
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。