Skip to content

Commit

Permalink
Merge pull request #233 from openshift-cherrypick-robot/cherry-pick-2…
Browse files Browse the repository at this point in the history
…31-to-18.0-fr1

[18.0-fr1] Expose ProvisionServerNodeSelector in baremetalset spec
  • Loading branch information
openshift-merge-bot[bot] authored Nov 20, 2024
2 parents 2bace32 + 2bd80e5 commit 78d219a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
10 changes: 8 additions & 2 deletions api/bases/baremetal.openstack.org_openstackbaremetalsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,15 @@ spec:
type: object
x-kubernetes-map-type: atomic
provisionServerName:
description: ProvisionServerName - Optional. If supplied will be used
as the base Image for the baremetalset instead of baseImageURL.
description: ProvisionServerName - Optional. Existing OpenStackProvisionServer
to use, else one would be created.
type: string
provisionServerNodeSelector:
additionalProperties:
type: string
description: ProvisonServerNodeSelector to target subset of worker
nodes running provision server
type: object
provisioningInterface:
description: ProvisioningInterface - Optional. If not provided along
with ProvisionServerName, it would be discovered from CBO. This
Expand Down
5 changes: 4 additions & 1 deletion api/v1beta1/openstackbaremetalset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,12 @@ type OpenStackBaremetalSetSpec struct {
// +kubebuilder:default=metadata
// +kubebuilder:validation:Optional
AutomatedCleaningMode AutomatedCleaningMode `json:"automatedCleaningMode,omitempty"`
// ProvisionServerName - Optional. If supplied will be used as the base Image for the baremetalset instead of baseImageURL.
// ProvisionServerName - Optional. Existing OpenStackProvisionServer to use, else one would be created.
// +kubebuilder:validation:Optional
ProvisionServerName string `json:"provisionServerName,omitempty"`
// +kubebuilder:validation:Optional
// ProvisonServerNodeSelector to target subset of worker nodes running provision server
ProvisonServerNodeSelector map[string]string `json:"provisionServerNodeSelector,omitempty"`
// ProvisioningInterface - Optional. If not provided along with ProvisionServerName, it would be discovered from CBO. This is the provisioning interface on the OCP masters/workers.
// +kubebuilder:validation:Optional
ProvisioningInterface string `json:"provisioningInterface,omitempty"`
Expand Down
7 changes: 7 additions & 0 deletions api/v1beta1/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 @@ -268,9 +268,15 @@ spec:
type: object
x-kubernetes-map-type: atomic
provisionServerName:
description: ProvisionServerName - Optional. If supplied will be used
as the base Image for the baremetalset instead of baseImageURL.
description: ProvisionServerName - Optional. Existing OpenStackProvisionServer
to use, else one would be created.
type: string
provisionServerNodeSelector:
additionalProperties:
type: string
description: ProvisonServerNodeSelector to target subset of worker
nodes running provision server
type: object
provisioningInterface:
description: ProvisioningInterface - Optional. If not provided along
with ProvisionServerName, it would be discovered from CBO. This
Expand Down
1 change: 1 addition & 0 deletions controllers/openstackbaremetalset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ func (r *OpenStackBaremetalSetReconciler) provisionServerCreateOrUpdate(
provisionServer.Spec.OSContainerImageURL = instance.Spec.OSContainerImageURL
provisionServer.Spec.ApacheImageURL = instance.Spec.ApacheImageURL
provisionServer.Spec.AgentImageURL = instance.Spec.AgentImageURL
provisionServer.Spec.NodeSelector = instance.Spec.ProvisonServerNodeSelector
provisionServer.Spec.Interface = instance.Spec.ProvisioningInterface

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

0 comments on commit 78d219a

Please sign in to comment.