Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions crd/multitenancy/api/v1alpha1/nodeinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,19 @@ type NodeInfoList struct {
Items []NodeInfo `json:"items"`
}

// NodeInfoSpec defines the desired state of NodeInfo
// NodeInfoSpec defines the desired state of NodeInfo. This is information
// provided by CNS.
type NodeInfoSpec struct {
// +kubebuilder:validation:Optional
VMUniqueID string `json:"vmUniqueID,omitempty"`

// +kubebuilder:validation:optional
// +kubebuilder:validation:Pattern=`^AZ\d{2}$`
HomeAZ string `json:"homeAZ,omitempty"`
}

// NodeInfoStatus defines the observed state of NodeInfo
// NodeInfoStatus defines the observed state of NodeInfo. This is information
// provided by DNC.
type NodeInfoStatus struct {
// +kubebuilder:validation:Optional
DeviceInfos []DeviceInfo `json:"deviceInfos,omitempty"`
Expand All @@ -47,10 +53,6 @@ type NodeInfoStatus struct {
type DeviceInfo struct {
DeviceType DeviceType `json:"deviceType,omitempty"`
MacAddress string `json:"macAddress"`

// +kubebuilder:validation:optional
// +kubebuilder:validation:Pattern=`^AZ\d{2}$`
HomeAZ string `json:"homeAZ,omitempty"`
}

func init() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,20 @@ spec:
metadata:
type: object
spec:
description: NodeInfoSpec defines the desired state of NodeInfo
description: |-
NodeInfoSpec defines the desired state of NodeInfo. This is information
provided by CNS.
properties:
homeAZ:
pattern: ^AZ\d{2}$
type: string
vmUniqueID:
type: string
type: object
status:
description: NodeInfoStatus defines the observed state of NodeInfo
description: |-
NodeInfoStatus defines the observed state of NodeInfo. This is information
provided by DNC.
properties:
deviceInfos:
items:
Expand All @@ -59,9 +66,6 @@ spec:
- acn.azure.com/vnet-nic
- acn.azure.com/infiniband-nic
type: string
homeAZ:
pattern: ^AZ\d{2}$
type: string
macAddress:
type: string
required:
Expand Down
Loading