Skip to content

Commit

Permalink
Update for percona-xtradb standalone restore (kubedb#491)
Browse files Browse the repository at this point in the history
Signed-off-by: shudipta <[email protected]>
  • Loading branch information
shudipta authored and tamalsaha committed Jan 28, 2020
1 parent 0e1d5e0 commit a02d04e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/controller/restoresession/restore_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ func (c *Controller) handleRestoreSession(rs *v1beta1.RestoreSession) error {
// `.spec.target.ref.name` from current RestoreSession object.
switch rs.Labels[api.LabelDatabaseKind] {
case api.ResourceKindPerconaXtraDB:
if rs.Spec.Target.Replicas == nil {
meta = metav1.ObjectMeta{
Name: rs.Spec.Target.Ref.Name,
}

break
}
pxList, err := c.ExtClient.KubedbV1alpha1().PerconaXtraDBs(rs.Namespace).List(metav1.ListOptions{})
if err != nil {
return err
Expand Down

0 comments on commit a02d04e

Please sign in to comment.