Skip to content

Commit

Permalink
Fix orc image namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
MaysaMacedo committed Dec 26, 2024
1 parent 223c1ed commit 97a5e4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hypershift-operator/controllers/nodepool/capi.go
Original file line number Diff line number Diff line change
Expand Up @@ -1325,5 +1325,5 @@ func (r *NodePoolReconciler) getMachinesForNodePool(ctx context.Context, nodePoo
}

func (c *CAPI) reconcileORCResources(ctx context.Context) error {
return openstack.ReconcileOpenStackImageCR(ctx, c.Client, c.CreateOrUpdate, c.hostedCluster, c.releaseImage)
return openstack.ReconcileOpenStackImageCR(ctx, c.Client, c.CreateOrUpdate, c.hostedCluster, c.releaseImage, c.controlplaneNamespace)
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ func MachineTemplateSpec(hcluster *hyperv1.HostedCluster, nodePool *hyperv1.Node
return openStackMachineTemplate, nil
}

func ReconcileOpenStackImageCR(ctx context.Context, client client.Client, createOrUpdate upsert.CreateOrUpdateFN, hcluster *hyperv1.HostedCluster, release *releaseinfo.ReleaseImage) error {
func ReconcileOpenStackImageCR(ctx context.Context, client client.Client, createOrUpdate upsert.CreateOrUpdateFN, hcluster *hyperv1.HostedCluster, release *releaseinfo.ReleaseImage, controlPlaneNamespace string) error {
releaseVersion, err := releaseinfo.OpenStackReleaseImage(release)
if err != nil {
return err
}
openStackImage := orc.Image{
ObjectMeta: metav1.ObjectMeta{
Name: "rhcos-" + releaseVersion + "-" + hcluster.Name,
Namespace: hcluster.Namespace,
Namespace: controlPlaneNamespace,
// TODO: add proper cleanup in CAPI resources cleanup
OwnerReferences: []metav1.OwnerReference{
{
Expand Down

0 comments on commit 97a5e4a

Please sign in to comment.