Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit da51d47

Browse files
author
Sven Speckmaier
committed
KeepaliveService - use recreate strategy
1 parent e5b7125 commit da51d47

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

app/Blueprint/Healthcheck/HealthcheckExtraInformation/HealthcheckExtraInformation.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class HealthcheckExtraInformation implements ServiceExtraInformation {
7373
* Rancher strategy recreate unhealthy containers
7474
* TODO: find recreate value
7575
*/
76-
const STRATEGY_RECREATE = '???';
76+
const STRATEGY_RECREATE = 'recreate';
7777

7878
/**
7979
* Rancher strategy recreate unhealthy containers if at least X containers are still healthy
@@ -223,5 +223,13 @@ public function setStrategy( string $strategy ) {
223223
$this->strategy = $strategy;
224224
}
225225

226+
public function setRecreateStrategy() {
227+
$this->strategy = self::STRATEGY_RECREATE;
228+
}
229+
230+
public function setDoNothingStrategy() {
231+
$this->strategy = self::STRATEGY_NONE;
232+
}
233+
226234

227235
}

app/Blueprint/Keepalive/KeepaliveService.php

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ private function setHealthcheck()
3434
$defaultSetter->setDefaults($healthcheckInformation);
3535
$healthcheckInformation->setPort(80);
3636
$healthcheckInformation->setInterval(10000);
37+
$healthcheckInformation->setRecreateStrategy();
3738
$this->addExtraInformation($healthcheckInformation);
3839
}
3940

0 commit comments

Comments
 (0)