Skip to content

Commit 0b5c3c5

Browse files
feat(k8s): support setting PodCidr, ServiceCidr, and ServiceDNSIP during cluster creation (scaleway#2661)
Co-authored-by: Laure-di <[email protected]>
1 parent 9ce93bb commit 0b5c3c5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

api/k8s/v1/k8s_sdk.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,15 @@ type Cluster struct {
12211221

12221222
// Deprecated: NewImagesEnabled: defines whether all pools are migrated to new images.
12231223
NewImagesEnabled *bool `json:"new_images_enabled,omitempty"`
1224+
1225+
// PodCidr: subnet used for the Pod CIDR.
1226+
PodCidr scw.IPNet `json:"pod_cidr"`
1227+
1228+
// ServiceCidr: subnet used for the Service CIDR.
1229+
ServiceCidr scw.IPNet `json:"service_cidr"`
1230+
1231+
// ServiceDNSIP: IP used for the DNS Service.
1232+
ServiceDNSIP net.IP `json:"service_dns_ip"`
12241233
}
12251234

12261235
// Node: node.
@@ -1432,6 +1441,15 @@ type CreateClusterRequest struct {
14321441

14331442
// PrivateNetworkID: private network ID for internal cluster communication (cannot be changed later).
14341443
PrivateNetworkID *string `json:"private_network_id,omitempty"`
1444+
1445+
// PodCidr: subnet used for the Pod CIDR (cannot be changed later).
1446+
PodCidr *scw.IPNet `json:"pod_cidr,omitempty"`
1447+
1448+
// ServiceCidr: subnet used for the Service CIDR (cannot be changed later).
1449+
ServiceCidr *scw.IPNet `json:"service_cidr,omitempty"`
1450+
1451+
// ServiceDNSIP: IP used for the DNS Service (cannot be changes later). If unset, default to Service CIDR's network + 10.
1452+
ServiceDNSIP *net.IP `json:"service_dns_ip,omitempty"`
14351453
}
14361454

14371455
// CreateExternalNodeRequest: create external node request.

0 commit comments

Comments
 (0)