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

Expose provision server images in baremetal set #126

Merged
merged 1 commit into from
Feb 12, 2024
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
12 changes: 12 additions & 0 deletions api/bases/baremetal.openstack.org_openstackbaremetalsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ spec:
spec:
description: OpenStackBaremetalSetSpec defines the desired state of OpenStackBaremetalSet
properties:
agentImageUrl:
description: AgentImageURL - Container image URL for the sidecar container
that discovers provisioning network IPs
type: string
apacheImageUrl:
description: ApacheImageURL - Container image URL for the main container
that serves the downloaded OS qcow2 image (osImage)
type: string
automatedCleaningMode:
default: metadata
description: When set to disabled, automated cleaning will be avoided
Expand Down Expand Up @@ -247,6 +255,10 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
osContainerImageUrl:
description: OSContainerImageURL - Container image URL for init with
the OS qcow2 image (osImage)
type: string
osImage:
description: OSImage - OS qcow2 image Name
type: string
Expand Down
9 changes: 9 additions & 0 deletions api/v1beta1/openstackbaremetalset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ type OpenStackBaremetalSetSpec struct {
// OSImage - OS qcow2 image Name
OSImage string `json:"osImage,omitempty"`
// +kubebuilder:validation:Optional
// OSContainerImageURL - Container image URL for init with the OS qcow2 image (osImage)
OSContainerImageURL string `json:"osContainerImageUrl,omitempty"`
// +kubebuilder:validation:Optional
// ApacheImageURL - Container image URL for the main container that serves the downloaded OS qcow2 image (osImage)
ApacheImageURL string `json:"apacheImageUrl,omitempty"`
// +kubebuilder:validation:Optional
// AgentImageURL - Container image URL for the sidecar container that discovers provisioning network IPs
AgentImageURL string `json:"agentImageUrl,omitempty"`
// +kubebuilder:validation:Optional
// UserData holds the reference to the Secret containing the user
// data to be passed to the host before it boots. UserData can be
// set per host in BaremetalHosts or here. If none of these are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ spec:
spec:
description: OpenStackBaremetalSetSpec defines the desired state of OpenStackBaremetalSet
properties:
agentImageUrl:
description: AgentImageURL - Container image URL for the sidecar container
that discovers provisioning network IPs
type: string
apacheImageUrl:
description: ApacheImageURL - Container image URL for the main container
that serves the downloaded OS qcow2 image (osImage)
type: string
automatedCleaningMode:
default: metadata
description: When set to disabled, automated cleaning will be avoided
Expand Down Expand Up @@ -247,6 +255,10 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
osContainerImageUrl:
description: OSContainerImageURL - Container image URL for init with
the OS qcow2 image (osImage)
type: string
osImage:
description: OSImage - OS qcow2 image Name
type: string
Expand Down
3 changes: 3 additions & 0 deletions controllers/openstackbaremetalset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,9 @@ func (r *OpenStackBaremetalSetReconciler) provisionServerCreateOrUpdate(
}

provisionServer.Spec.OSImage = instance.Spec.OSImage
provisionServer.Spec.OSContainerImageURL = instance.Spec.OSContainerImageURL
provisionServer.Spec.ApacheImageURL = instance.Spec.ApacheImageURL
provisionServer.Spec.AgentImageURL = instance.Spec.AgentImageURL
provisionServer.Spec.Interface = instance.Spec.ProvisioningInterface

err = controllerutil.SetControllerReference(instance, provisionServer, helper.GetScheme())
Expand Down
Loading