Skip to content

Commit 7bce22d

Browse files
pjohnst5NihaNallappagari
authored andcommitted
MTPNC CRD changes for NUMA-Aware Infiniband pods (Azure#3878)
* MTPNC CRD changes for NUMA-Aware pods with infiniband NICs * More descriptive description haha * IBMACAddresses * Make mac string type to not break OpenAPI schema * Status to MTPNC definition * reference * Rename statuses to unambiguate ambiguity * make crd
1 parent 6c0b26a commit 7bce22d

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

crd/multitenancy/api/v1alpha1/multitenantpodnetworkconfig.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,22 @@ type MultitenantPodNetworkConfigSpec struct {
4545
PodNetwork string `json:"podNetwork"`
4646
// name of the requesting cx pod
4747
PodName string `json:"podName,omitempty"`
48+
// MAC addresses of the IB devices to use for a pod
49+
// +kubebuilder:validation:Optional
50+
IBMACAddresses []string `json:"IBMACAddresses,omitempty"`
4851
}
4952

53+
// +kubebuilder:validation:Enum=Unprogrammed;Programming;Programmed;Unprogramming;Failed
54+
type InfinibandStatus string
55+
56+
const (
57+
Unprogrammed InfinibandStatus = "Unprogrammed"
58+
Programming InfinibandStatus = "Programming"
59+
Programmed InfinibandStatus = "Programmed"
60+
Unprogramming InfinibandStatus = "Unprogramming"
61+
Failed InfinibandStatus = "Failed"
62+
)
63+
5064
type InterfaceInfo struct {
5165
// NCID is the network container id
5266
NCID string `json:"ncID,omitempty"`
@@ -66,6 +80,9 @@ type InterfaceInfo struct {
6680
// AccelnetEnabled determines if the CNI will provision the NIC with accelerated networking enabled
6781
// +kubebuilder:validation:Optional
6882
AccelnetEnabled bool `json:"accelnetEnabled,omitempty"`
83+
// IBStatus is the programming status of the infiniband device
84+
// +kubebuilder:validation:Optional
85+
IBStatus InfinibandStatus `json:"ibStatus,omitempty"`
6986
}
7087

7188
// MultitenantPodNetworkConfigStatus defines the observed state of PodNetworkConfig

crd/multitenancy/api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crd/multitenancy/manifests/multitenancy.acn.azure.com_multitenantpodnetworkconfigs.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ spec:
5656
description: MultitenantPodNetworkConfigSpec defines the desired state
5757
of PodNetworkConfig
5858
properties:
59+
IBMACAddresses:
60+
description: MAC addresses of the IB devices to use for a pod
61+
items:
62+
type: string
63+
type: array
5964
podName:
6065
description: name of the requesting cx pod
6166
type: string
@@ -98,6 +103,16 @@ spec:
98103
gatewayIP:
99104
description: GatewayIP is the gateway ip of the injected subnet
100105
type: string
106+
ibStatus:
107+
description: IBStatus is the programming status of the infiniband
108+
device
109+
enum:
110+
- Unprogrammed
111+
- Programming
112+
- Programmed
113+
- Unprogramming
114+
- Failed
115+
type: string
101116
macAddress:
102117
description: MacAddress is the MAC Address of the VM's NIC which
103118
this network container was created for

0 commit comments

Comments
 (0)