Skip to content

Commit

Permalink
Merge branch 'master' into SubnetAddressSpace_K8sSwiftv2
Browse files Browse the repository at this point in the history
  • Loading branch information
kmurudi authored Jul 9, 2024
2 parents 45393a9 + 662ae87 commit 02fca1e
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 2 deletions.
16 changes: 15 additions & 1 deletion crd/multitenancy/api/v1alpha1/nodeinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ import (
// +kubebuilder:object:root=true

// NodeInfo is the Schema for the NodeInfo API
// +kubebuilder:subresource:status
// +kubebuilder:resource:shortName=ni,scope=Cluster,path=nodeinfo
// +kubebuilder:printcolumn:name="VMUniqueID",type=string,priority=0,JSONPath=`.spec.vmUniqueID`
// +kubebuilder:printcolumn:name="Status",type=string,priority=1,JSONPath=`.status.status`
type NodeInfo struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec NodeInfoSpec `json:"spec,omitempty"`
Spec NodeInfoSpec `json:"spec,omitempty"`
Status NodeInfoStatus `json:"status,omitempty"`
}

// +kubebuilder:object:root=true
Expand All @@ -36,6 +39,17 @@ type NodeInfoSpec struct {
VMUniqueID string `json:"vmUniqueID,omitempty"`
}

// NodeInfoStatus defines the observed state of NodeInfo
type NodeInfoStatus struct {
// +kubebuilder:validation:Optional
DeviceInfos []DeviceInfo `json:"deviceInfos,omitempty"`
}

type DeviceInfo struct {
DeviceType DeviceType `json:"deviceType,omitempty"`
DeviceCount int `json:"deviceCount"`
}

func init() {
SchemeBuilder.Register(&NodeInfo{}, &NodeInfoList{})
}
36 changes: 36 additions & 0 deletions crd/multitenancy/api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ spec:
- jsonPath: .spec.vmUniqueID
name: VMUniqueID
type: string
- jsonPath: .status.status
name: Status
priority: 1
type: string
name: v1alpha1
schema:
openAPIV3Schema:
Expand All @@ -43,7 +47,26 @@ spec:
vmUniqueID:
type: string
type: object
status:
description: NodeInfoStatus defines the observed state of NodeInfo
properties:
deviceInfos:
items:
properties:
deviceCount:
type: integer
deviceType:
enum:
- acn.azure.com/vnet-nic
- acn.azure.com/infiniband-nic
type: string
required:
- deviceCount
type: object
type: array
type: object
type: object
served: true
storage: true
subresources: {}
subresources:
status: {}

0 comments on commit 02fca1e

Please sign in to comment.