Skip to content

Commit

Permalink
Update ByoHost/ ByoMachine CRDs for installer changes
Browse files Browse the repository at this point in the history
ByoHost will have a optional reference for InstallationSecret,
ByoMachine will have an optional reference to InstallerConfig and will
also hold the attached ByoHost platform details.
  • Loading branch information
Dharmjit Singh committed Apr 20, 2022
1 parent 04b3b81 commit f2a7846
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apis/infrastructure/v1beta1/byohost_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ type ByoHostSpec struct {
// for bootstrap purpose
// +optional
BootstrapSecret *corev1.ObjectReference `json:"bootstrapSecret,omitempty"`

// InstallationSecret is an optional reference to InstallationSecret
// generated by InstallerController for k8s installation
// +optional
InstallationSecret *corev1.ObjectReference `json:"installationSecret,omitempty"`
}

// HostInfo is a set of details about the host platform.
Expand Down
10 changes: 10 additions & 0 deletions apis/infrastructure/v1beta1/byomachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package v1beta1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
)
Expand All @@ -21,6 +22,11 @@ type ByoMachineSpec struct {
Selector *metav1.LabelSelector `json:"selector,omitempty"`

ProviderID string `json:"providerID,omitempty"`

// InstallerRef is an optional reference to a installer-specific resource that holds
// the details of InstallationSecret to be used to install BYOH Bundle.
// +optional
InstallerRef *corev1.ObjectReference `json:"installerRef,omitempty"`
}

// NetworkStatus provides information about one of a VM's networks.
Expand Down Expand Up @@ -50,6 +56,10 @@ type ByoMachineStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file

// HostInfo has the attached host platform details.
// +optional
HostInfo HostInfo `json:"hostinfo,omitempty"`

// +optional
Ready bool `json:"ready"`

Expand Down
11 changes: 11 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.

37 changes: 37 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 @@ -75,6 +75,43 @@ spec:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
installationSecret:
description: InstallationSecret is an optional reference to InstallationSecret
generated by InstallerController for k8s installation
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
type: object
status:
description: ByoHostStatus defines the observed state of ByoHost
Expand Down
51 changes: 51 additions & 0 deletions config/crd/bases/infrastructure.cluster.x-k8s.io_byomachines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,44 @@ spec:
spec:
description: ByoMachineSpec defines the desired state of ByoMachine
properties:
installerRef:
description: InstallerRef is an optional reference to a installer-specific
resource that holds the details of InstallationSecret to be used
to install BYOH Bundle.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
providerID:
type: string
selector:
Expand Down Expand Up @@ -133,6 +171,19 @@ spec:
- type
type: object
type: array
hostinfo:
description: HostInfo has the attached host platform details.
properties:
architecture:
description: The Architecture 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
ready:
type: boolean
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,45 @@ spec:
description: Spec is the specification of the desired behavior
of the machine.
properties:
installerRef:
description: InstallerRef is an optional reference to a installer-specific
resource that holds the details of InstallationSecret to
be used to install BYOH Bundle.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead
of an entire object, this string should contain a valid
JSON/Go field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container
within a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that
triggered the event) or if no container name is specified
"spec.containers[2]" (container with index 2 in this
pod). This syntax is chosen only to have some well-defined
way of referencing a part of an object. TODO: this design
is not final and this field is subject to change in
the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
providerID:
type: string
selector:
Expand Down

0 comments on commit f2a7846

Please sign in to comment.