Skip to content

Commit

Permalink
Add Hardware resources and BMCRef
Browse files Browse the repository at this point in the history
Signed-off-by: Micah Hausler <mhausler@amazon.com>
  • Loading branch information
micahhausler committed May 6, 2022
1 parent f48c79b commit d2365b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ require (
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0
google.golang.org/protobuf v1.27.1
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.23.0
k8s.io/apimachinery v0.23.0
k8s.io/client-go v0.23.0
knative.dev/pkg v0.0.0-20211119170723-a99300deff34
Expand Down Expand Up @@ -160,7 +161,6 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/api v0.23.0 // indirect
k8s.io/apiextensions-apiserver v0.23.0 // indirect
k8s.io/component-base v0.23.0 // indirect
k8s.io/klog/v2 v2.60.1 // indirect
Expand Down
13 changes: 13 additions & 0 deletions pkg/apis/core/v1alpha1/hardware_types.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package v1alpha1

import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down Expand Up @@ -42,6 +44,12 @@ type Hardware struct {
// HardwareSpec defines the desired state of Hardware.
type HardwareSpec struct {

// BMCRef contains a relation to a BMC state management type in the same
// namespace as the Hardware. This may be used for BMC management by
// orchestrators.
//+optional
BMCRef *corev1.TypedLocalObjectReference `json:"bmcRef,omitempty"`

//+optional
Interfaces []Interface `json:"interfaces,omitempty"`

Expand All @@ -57,6 +65,11 @@ type HardwareSpec struct {
//+optional
Disks []Disk `json:"disks,omitempty"`

// Resources represents known resources that are available on a machine.
// Resources may be used for scheduling by orchestrators.
//+optional
Resources map[string]resource.Quantity `json:"resources,omitempty"`

// UserData is the user data to configure in the hardware's
// metadata
//+optional
Expand Down

0 comments on commit d2365b8

Please sign in to comment.