Skip to content

Commit

Permalink
use toleration master nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Elbehery committed Oct 10, 2024
1 parent b220624 commit a9ad623
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func (c *PeriodicBackupController) sync(ctx context.Context, _ factory.SyncConte
return fmt.Errorf("PeriodicBackupController could not create [defaultBackupDeployment]: %w", err)
}
}
klog.V(4).Infof("PeriodicBackupController created DaemonSet [%v] successfully", backupServerDaemonSet)
continue
}

Expand All @@ -141,6 +142,7 @@ func (c *PeriodicBackupController) sync(ctx context.Context, _ factory.SyncConte
return fmt.Errorf("PeriodicBackupController could not delete [defaultBackupDeployment]: %w", err)
}
}
klog.V(4).Infof("PeriodicBackupController deleted DaemonSet [%v] successfully", backupServerDaemonSet)
}

_, _, updateErr := v1helpers.UpdateStatus(ctx, c.operatorClient, v1helpers.UpdateConditionFn(operatorv1.OperatorCondition{
Expand Down Expand Up @@ -329,6 +331,12 @@ func deployBackupServerDaemonSet() *appv1.DaemonSet {
},
},
Spec: corev1.PodSpec{
Tolerations: []corev1.Toleration{
{
Key: "node-role.kubernetes.io/master",
Value: "NoSchedule",
},
},
NodeSelector: map[string]string{"node-role.kubernetes.io/master": ""},
Volumes: []corev1.Volume{
{Name: "data-dir", VolumeSource: corev1.VolumeSource{
Expand Down

0 comments on commit a9ad623

Please sign in to comment.