Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform specific fields in BYOHost CRD #479

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
24 changes: 24 additions & 0 deletions apis/infrastructure/v1beta1/byohost_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,26 @@ type ByoHostSpec struct {
BootstrapSecret *corev1.ObjectReference `json:"bootstrapSecret,omitempty"`
}

// HostStatus is a set of details about the host platform.
type HostStatus struct {
sachinkumarsingh092 marked this conversation as resolved.
Show resolved Hide resolved
anusha94 marked this conversation as resolved.
Show resolved Hide resolved
// MachineID reported by the host. For unique machine identification
// in the cluster this field is preferred. Learn more from man(5)
// machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html
HostID string `json:"hostid,omitempty"`
sachinkumarsingh092 marked this conversation as resolved.
Show resolved Hide resolved

// The Operating System reported by the host.
OSName string `json:"osname,omitempty"`

// OS Image reported by the host.
OSImage string `json:"osimage,omitempty"`
sachinkumarsingh092 marked this conversation as resolved.
Show resolved Hide resolved

// Kernel Version reported by the host.
KernelVersion string `json:"kernelversion,omitempty"`

// The Architecture reported by the host.
Architecture string `json:"architecture,omitempty"`
}

// ByoHostStatus defines the observed state of ByoHost
type ByoHostStatus struct {
// MachineRef is an optional reference to a Cluster API Machine
Expand All @@ -43,6 +63,10 @@ type ByoHostStatus struct {
// +optional
Conditions clusterv1.Conditions `json:"conditions,omitempty"`

// HostInfo returns the platform details of the host.
// +optional
HostInfo HostStatus `json:"hostinfo,omitempty"`

// Network returns the network status for each of the host's configured
// network interfaces.
// +optional
Expand Down
16 changes: 16 additions & 0 deletions apis/infrastructure/v1beta1/zz_generated.deepcopy.go

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

21 changes: 21 additions & 0 deletions config/crd/bases/infrastructure.cluster.x-k8s.io_byohosts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,27 @@ spec:
- type
type: object
type: array
hostinfo:
description: HostInfo returns the platform details of the host.
properties:
architecture:
description: The Architecture reported by the host.
type: string
hostid:
description: 'MachineID reported by the host. For unique machine
identification in the cluster this field is preferred. Learn
more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html'
type: string
kernelversion:
description: Kernel Version reported by the host.
type: string
osimage:
description: OS Image reported by the host.
type: string
osname:
description: The Operating System reported by the host.
type: string
type: object
machineRef:
description: MachineRef is an optional reference to a Cluster API
Machine using this host.
Expand Down