Skip to content

Commit 1ccb444

Browse files
committed
MTPNC CRD changes for NUMA-Aware pods with infiniband NICs
1 parent 138e4f5 commit 1ccb444

File tree

4 files changed

+44
-1
lines changed

4 files changed

+44
-1
lines changed

cns/types/infiniband/status.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package infiniband
2+
3+
type Status int
4+
5+
const (
6+
Available Status = 0
7+
ProgrammingPending Status = 1
8+
ProgrammingFailed Status = 2
9+
ProgrammingComplete Status = 3
10+
ReleasePending Status = 4
11+
)

crd/multitenancy/api/v1alpha1/multitenantpodnetworkconfig.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
package v1alpha1
55

66
import (
7+
"net"
8+
9+
"github.com/Azure/azure-container-networking/cns/types/infiniband"
710
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
811
)
912

@@ -45,6 +48,9 @@ type MultitenantPodNetworkConfigSpec struct {
4548
PodNetwork string `json:"podNetwork"`
4649
// name of the requesting cx pod
4750
PodName string `json:"podName,omitempty"`
51+
// list of IB MACs to use for a pod
52+
// +kubebuilder:validation:Optional
53+
IBMACs []net.HardwareAddr `json:"IBMACs,omitempty"`
4854
}
4955

5056
type InterfaceInfo struct {
@@ -66,6 +72,9 @@ type InterfaceInfo struct {
6672
// AccelnetEnabled determines if the CNI will provision the NIC with accelerated networking enabled
6773
// +kubebuilder:validation:Optional
6874
AccelnetEnabled bool `json:"accelnetEnabled,omitempty"`
75+
// IBStatus is the programming status of the infiniband device
76+
// +kubebuilder:validation:Optional
77+
IBStatus infiniband.Status `json:"ibStatus,omitempty"`
6978
}
7079

7180
// MultitenantPodNetworkConfigStatus defines the observed state of PodNetworkConfig

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

Lines changed: 13 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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ spec:
5656
description: MultitenantPodNetworkConfigSpec defines the desired state
5757
of PodNetworkConfig
5858
properties:
59+
IBMACs:
60+
description: list of IB MACs to use for a pod
61+
items:
62+
description: A HardwareAddr represents a physical hardware address.
63+
format: byte
64+
type: string
65+
type: array
5966
podName:
6067
description: name of the requesting cx pod
6168
type: string
@@ -98,6 +105,10 @@ spec:
98105
gatewayIP:
99106
description: GatewayIP is the gateway ip of the injected subnet
100107
type: string
108+
ibStatus:
109+
description: IBStatus is the programming status of the infiniband
110+
device
111+
type: integer
101112
macAddress:
102113
description: MacAddress is the MAC Address of the VM's NIC which
103114
this network container was created for

0 commit comments

Comments
 (0)