diff --git a/crd/multitenancy/api/v1alpha1/multitenantpodnetworkconfig.go b/crd/multitenancy/api/v1alpha1/multitenantpodnetworkconfig.go index dba7fdd117..c217f2dafa 100644 --- a/crd/multitenancy/api/v1alpha1/multitenantpodnetworkconfig.go +++ b/crd/multitenancy/api/v1alpha1/multitenantpodnetworkconfig.go @@ -45,8 +45,22 @@ type MultitenantPodNetworkConfigSpec struct { PodNetwork string `json:"podNetwork"` // name of the requesting cx pod PodName string `json:"podName,omitempty"` + // MAC addresses of the IB devices to use for a pod + // +kubebuilder:validation:Optional + IBMACAddresses []string `json:"IBMACAddresses,omitempty"` } +// +kubebuilder:validation:Enum=Unprogrammed;Programming;Programmed;Unprogramming;Failed +type InfinibandStatus string + +const ( + Unprogrammed InfinibandStatus = "Unprogrammed" + Programming InfinibandStatus = "Programming" + Programmed InfinibandStatus = "Programmed" + Unprogramming InfinibandStatus = "Unprogramming" + Failed InfinibandStatus = "Failed" +) + type InterfaceInfo struct { // NCID is the network container id NCID string `json:"ncID,omitempty"` @@ -66,6 +80,9 @@ type InterfaceInfo struct { // AccelnetEnabled determines if the CNI will provision the NIC with accelerated networking enabled // +kubebuilder:validation:Optional AccelnetEnabled bool `json:"accelnetEnabled,omitempty"` + // IBStatus is the programming status of the infiniband device + // +kubebuilder:validation:Optional + IBStatus InfinibandStatus `json:"ibStatus,omitempty"` } // MultitenantPodNetworkConfigStatus defines the observed state of PodNetworkConfig diff --git a/crd/multitenancy/api/v1alpha1/zz_generated.deepcopy.go b/crd/multitenancy/api/v1alpha1/zz_generated.deepcopy.go index 92911a46cd..cab14e1666 100644 --- a/crd/multitenancy/api/v1alpha1/zz_generated.deepcopy.go +++ b/crd/multitenancy/api/v1alpha1/zz_generated.deepcopy.go @@ -43,7 +43,7 @@ func (in *MultitenantPodNetworkConfig) DeepCopyInto(out *MultitenantPodNetworkCo *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) } @@ -100,6 +100,11 @@ func (in *MultitenantPodNetworkConfigList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MultitenantPodNetworkConfigSpec) DeepCopyInto(out *MultitenantPodNetworkConfigSpec) { *out = *in + if in.IBMACAddresses != nil { + in, out := &in.IBMACAddresses, &out.IBMACAddresses + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultitenantPodNetworkConfigSpec. diff --git a/crd/multitenancy/manifests/multitenancy.acn.azure.com_multitenantpodnetworkconfigs.yaml b/crd/multitenancy/manifests/multitenancy.acn.azure.com_multitenantpodnetworkconfigs.yaml index 9390424b82..c693498faa 100644 --- a/crd/multitenancy/manifests/multitenancy.acn.azure.com_multitenantpodnetworkconfigs.yaml +++ b/crd/multitenancy/manifests/multitenancy.acn.azure.com_multitenantpodnetworkconfigs.yaml @@ -56,6 +56,11 @@ spec: description: MultitenantPodNetworkConfigSpec defines the desired state of PodNetworkConfig properties: + IBMACAddresses: + description: MAC addresses of the IB devices to use for a pod + items: + type: string + type: array podName: description: name of the requesting cx pod type: string @@ -98,6 +103,16 @@ spec: gatewayIP: description: GatewayIP is the gateway ip of the injected subnet type: string + ibStatus: + description: IBStatus is the programming status of the infiniband + device + enum: + - Unprogrammed + - Programming + - Programmed + - Unprogramming + - Failed + type: string macAddress: description: MacAddress is the MAC Address of the VM's NIC which this network container was created for