Skip to content

Commit

Permalink
ceph: apply csi provisioner node-affinity to csi version check job
Browse files Browse the repository at this point in the history
This commit makes sure csi provisioner node-affinity is applied
to the csi version check job as well, similar to the how
the existing csi provisioner toleration is applied to the job.

Fixes: #8323

Signed-off-by: Rakshith R <rar@redhat.com>
(cherry picked from commit c1ef189)

# Conflicts:
#	pkg/operator/ceph/csi/spec.go
  • Loading branch information
Rakshith-R authored and mergify-bot committed Oct 13, 2021
1 parent ba77f9f commit c01d805
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/operator/ceph/csi/spec.go
Expand Up @@ -726,8 +726,16 @@ func validateCSIVersion(clientset kubernetes.Interface, namespace, rookImage, se
job := versionReporter.Job()
job.Spec.Template.Spec.ServiceAccountName = serviceAccountName

<<<<<<< HEAD
// Apply csi provisioner toleration for csi version check job
job.Spec.Template.Spec.Tolerations = getToleration(clientset, provisionerTolerationsEnv, []corev1.Toleration{})
=======
// Apply csi provisioner toleration and affinity for csi version check job
job.Spec.Template.Spec.Tolerations = getToleration(r.opConfig.Parameters, provisionerTolerationsEnv, []corev1.Toleration{})
job.Spec.Template.Spec.Affinity = &corev1.Affinity{
NodeAffinity: getNodeAffinity(r.opConfig.Parameters, provisionerNodeAffinityEnv, &corev1.NodeAffinity{}),
}
>>>>>>> c1ef189b9 (ceph: apply csi provisioner node-affinity to csi version check job)
stdout, _, retcode, err := versionReporter.Run(timeout)
if err != nil {
return nil, errors.Wrap(err, "failed to complete ceph CSI version job")
Expand Down

0 comments on commit c01d805

Please sign in to comment.