You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ref/apis/vpc.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,6 +141,7 @@ _Appears in:_
141
141
|`AutoSnatEnabled`||
142
142
|`ExternalIPBlocksConfigured`||
143
143
|`DeletionFailed`||
144
+
|`UpdateFailed`||
144
145
145
146
146
147
#### ConnectivityState
@@ -850,7 +851,8 @@ _Appears in:_
850
851
| Field | Description | Default | Validation |
851
852
| --- | --- | --- | --- |
852
853
|`subnet`_string_| Subnet specifies the Subnet to reserve IPs from.<br />The Subnet needs to have static IP allocation activated. || Required: \{\} <br /> |
853
-
|`numberOfIPs`_integer_| NumberOfIPs defines number of IPs requested to be reserved. || Maximum: 100 <br />Minimum: 1 <br />Required: \{\} <br /> |
854
+
|`numberOfIPs`_integer_| NumberOfIPs defines number of IPs requested to be reserved. || Maximum: 100 <br />Minimum: 1 <br /> |
855
+
|`reservedIPs`_string array_| ReservedIPs represents array of Reserved IPs. It can can contain IP addresses,<br />IP Address range and CIDRs.<br />Supported formats include: ["192.168.1.1", "192.168.1.3-192.168.1.100", "192.168.2.0/28"]|| MinItems: 1 <br /> |
854
856
855
857
856
858
#### SubnetIPReservationStatus
@@ -867,7 +869,7 @@ _Appears in:_
867
869
| Field | Description | Default | Validation |
868
870
| --- | --- | --- | --- |
869
871
|`conditions`_[Condition](#condition) array_| Conditions described if the SubnetIPReservation is configured on NSX or not.<br />Condition type "" |||
870
-
|`ips`_string array_| List of reserved IPs.<br />Supported formats include: ["192.168.1.1", "192.168.1.3-192.168.1.100"]|||
872
+
|`ips`_string array_| List of reserved IPs.<br />Supported formats include: ["192.168.1.1", "192.168.1.3-192.168.1.100", "192.168.2.0/28"]|||
Copy file name to clipboardExpand all lines: pkg/apis/vpc/v1alpha1/subnetipreservation_types.go
+14-5Lines changed: 14 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -8,19 +8,28 @@ import (
8
8
)
9
9
10
10
// SubnetIPReservationSpec defines the desired state of SubnetIPReservation
11
+
// +kubebuilder:validation:XValidation:rule="!has(self.numberOfIPs) || !has(self.reservedIPs)",message="Only one of numberOfIPs or reservedIPs can be specified"
12
+
// +kubebuilder:validation:XValidation:rule="has(self.numberOfIPs) || has(self.reservedIPs)",message="One of numberOfIPs or reservedIPs must be specified"
13
+
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.reservedIPs) || has(self.reservedIPs)",message="reservedIPs cannot be unset once set"
14
+
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.numberOfIPs) || has(self.numberOfIPs)",message="numberOfIPs cannot be unset once set"
11
15
typeSubnetIPReservationSpecstruct {
12
16
// Subnet specifies the Subnet to reserve IPs from.
13
17
// The Subnet needs to have static IP allocation activated.
14
18
// +kubebuilder:validation:Required
15
-
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Subnet is immutable"
19
+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="subnet is immutable"
16
20
Subnetstring`json:"subnet"`
17
21
18
22
// NumberOfIPs defines number of IPs requested to be reserved.
19
-
// +kubebuilder:validation:Required
20
-
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="NumberOfIPs is immutable"
23
+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="numberOfIPs is immutable"
21
24
// +kubebuilder:validation:Maximum:=100
22
25
// +kubebuilder:validation:Minimum:=1
23
-
NumberOfIPsint`json:"numberOfIPs"`
26
+
NumberOfIPsint`json:"numberOfIPs,omitempty"`
27
+
28
+
// ReservedIPs represents array of Reserved IPs. It can can contain IP addresses,
0 commit comments