Skip to content

Commit

Permalink
K8SPXC: set controller referenece for PiTR deployment
Browse files Browse the repository at this point in the history
Set controller reference for PiTR deployment the same way
as it's set for PXC and proxy StatefulSets
  • Loading branch information
s10 committed Nov 26, 2024
1 parent 5fa7bf2 commit 8b45639
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/pxc/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ func (r *ReconcilePerconaXtraDBCluster) reconcileBackups(ctx context.Context, cr
if err != nil {
return errors.Errorf("get binlog collector deployment for cluster '%s': %v", cr.Name, err)
}
err = setControllerReference(cr, &binlogCollector, r.scheme)
if err != nil {
return errors.Wrapf(err, "set controller reference for binlog collector deployment '%s'", binlogCollector.Name)
}

currentCollector := appsv1.Deployment{}
err = r.client.Get(context.TODO(), types.NamespacedName{Name: binlogCollector.Name, Namespace: binlogCollector.Namespace}, &currentCollector)
Expand Down

0 comments on commit 8b45639

Please sign in to comment.