exporter: change deployment strategy to Recreate
Restarting the exporter using RollingRelease causes a race condition,
that results in exporter crashing and the ceph health to show a warning.
Signed-off-by: Divyansh Kamboj <dkamboj@redhat.com>
(cherry picked from commit f9d6cd7f3a)
This commit is contained in:
1 parent
2125cdf74e
commit
e312fae3cf
1 file changed
+5
@@ -117,6 +117,11 @@ func (r *ReconcileNode) createOrUpdateCephExporter(node corev1.Node, tolerations
|
||||
if cephVersion != nil {
|
||||
controller.AddCephVersionLabelToDeployment(*cephVersion, deploy)
|
||||
}
|
||||
|
||||
// wait for previous exporter pod to be deleted, before creating a new one
|
||||
// to avoid fighting for the same socket file
|
||||
deploy.Spec.Strategy.Type = appsv1.RecreateDeploymentStrategyType
|
||||
|
||||
var terminationGracePeriodSeconds int64 = 2
|
||||
deploy.Spec.Template = corev1.PodTemplateSpec{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
|
||||
Reference in new issue
Block a user