apache / apache/cloudstack

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

Đang mở
#12,705 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
complexity:unknown component:advanced-networking component:basic-network component:networking no-issue-activity type:improvement
Ngôn ngữ chính
Java
Star
3.1k
Fork
1.4k
Merge trung bình
6 ngày 19 giờ
Pull request đã merge (30 ngày)
32

Mô tả

### 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với các đường dẫn API createKubernetesCluster và deployVirtualMachine, thiết lập hiện có cloud.kubernetes.cluster.network.offering và truy vấn cloud.network_offerings được nêu trong issue. Xác định cách các giá trị mặc định được chọn cho các mạng isolated, shared, L2, VPC, NSX và Netris. Công việc được xem là hoàn tất khi quản trị viên có thể cấu hình các giá trị mặc định toàn cục riêng biệt mà không cần thay đổi thủ công khả dụng của các offering, và cả hai luồng API đều sử dụng giá trị mặc định đã cấu hình phù hợp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
backend-api-design, cloud, networking
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.