Skip to content

Commit

Permalink
Merge pull request #231 from rabi/node_selector
Browse files Browse the repository at this point in the history
Expose ProvisionServerNodeSelector in baremetalset spec
  • Loading branch information
openshift-merge-bot[bot] authored Nov 18, 2024
2 parents a50471a + 400f623 commit a1d460a
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 @@ -519,6 +519,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 a1d460a

Please sign in to comment.