Skip to content

Commit c061f1e

Browse files
committed
feat: add fields in pod network crd for prefix block mode for swiftv2
1 parent 8100de6 commit c061f1e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

crd/multitenancy/api/v1alpha1/podnetwork.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ const (
4545
DeviceTypeInfiniBandNIC DeviceType = "acn.azure.com/infiniband-nic"
4646
)
4747

48+
// +kubebuilder:validation:Enum=Single;PrefixBlock
49+
type SubnetAllocationMode string
50+
51+
const (
52+
Single SubnetAllocationMode = "Single"
53+
PrefixBlock SubnetAllocationMode = "PrefixBlock"
54+
)
55+
4856
// PodNetworkSpec defines the desired state of PodNetwork
4957
type PodNetworkSpec struct {
5058
// NetworkID is the identifier for the network, e.g. vnet guid or IB network ID
@@ -62,6 +70,10 @@ type PodNetworkSpec struct {
6270
// Deprecated - Use NetworkID
6371
// +kubebuilder:validation:Optional
6472
VnetGUID string `json:"vnetGUID,omitempty"`
73+
// subnet allocation mode
74+
// +kubebuilder:validation:Optional
75+
// +kubebuilder:default=Single
76+
SubnetAllocationMode SubnetAllocationMode `json:"subnetAllocationMode,omitempty"`
6577
}
6678

6779
// Status indicates the status of PN
@@ -80,6 +92,9 @@ type PodNetworkStatus struct {
8092
// +kubebuilder:validation:Optional
8193
Status Status `json:"status,omitempty"`
8294
AddressPrefixes []string `json:"addressPrefixes,omitempty"`
95+
// BlockModeAllocationSize indicates the size of IP block allocated (default 16)
96+
// +kubebuilder:default=16
97+
BlockModeAllocationSize int `json:"blockModeAllocationSize,omitempty"`
8398
}
8499

85100
func init() {

0 commit comments

Comments
 (0)