diff --git a/crd/multitenancy/api/v1alpha1/podnetworkinstance.go b/crd/multitenancy/api/v1alpha1/podnetworkinstance.go index 72ee4bfad10..c48f6c69388 100644 --- a/crd/multitenancy/api/v1alpha1/podnetworkinstance.go +++ b/crd/multitenancy/api/v1alpha1/podnetworkinstance.go @@ -47,9 +47,21 @@ type PodNetworkInstanceSpec struct { // PodNetworkInstanceStatus defines the observed state of PodNetworkInstance type PodNetworkInstanceStatus struct { - PodIPAddresses []string `json:"podIPAddresses,omitempty"` + PodIPAddresses []string `json:"podIPAddresses,omitempty"` + Status PNIStatus `json:"status,omitempty"` } +// PNIStatus indicates the status of PNI +// +kubebuilder:validation:Enum=Ready;CreateReservationSetError;PodNetworkNotReady;InsufficientIPAddressesOnSubnet +type PNIStatus string + +const ( + PNIStatusReady PNIStatus = "Ready" + PNIStatusCreateReservationSetError PNIStatus = "CreateReservationSetError" + PNIStatusPodNetworkNotReady PNIStatus = "PodNetworkNotReady" + PNIStatusInsufficientIPAddressesOnSubnet PNIStatus = "InsufficientIPAddressesOnSubnet" +) + func init() { SchemeBuilder.Register(&PodNetworkInstance{}, &PodNetworkInstanceList{}) } diff --git a/crd/multitenancy/manifests/multitenancy.acn.azure.com_podnetworkinstances.yaml b/crd/multitenancy/manifests/multitenancy.acn.azure.com_podnetworkinstances.yaml index 0c9e7c11121..436df43ff71 100644 --- a/crd/multitenancy/manifests/multitenancy.acn.azure.com_podnetworkinstances.yaml +++ b/crd/multitenancy/manifests/multitenancy.acn.azure.com_podnetworkinstances.yaml @@ -71,6 +71,14 @@ spec: items: type: string type: array + status: + description: PNIStatus indicates the status of PNI + enum: + - Ready + - CreateReservationSetError + - PodNetworkNotReady + - InsufficientIPAddressesOnSubnet + type: string type: object type: object served: true