@@ -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
4957type 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
85100func init () {
0 commit comments