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

Commit

Permalink
KeepaliveService - use recreate strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Speckmaier committed Apr 8, 2020
1 parent e5b7125 commit da51d47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class HealthcheckExtraInformation implements ServiceExtraInformation {
* Rancher strategy recreate unhealthy containers
* TODO: find recreate value
*/
const STRATEGY_RECREATE = '???';
const STRATEGY_RECREATE = 'recreate';

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

public function setRecreateStrategy() {
$this->strategy = self::STRATEGY_RECREATE;
}

public function setDoNothingStrategy() {
$this->strategy = self::STRATEGY_NONE;
}


}
1 change: 1 addition & 0 deletions app/Blueprint/Keepalive/KeepaliveService.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ private function setHealthcheck()
$defaultSetter->setDefaults($healthcheckInformation);
$healthcheckInformation->setPort(80);
$healthcheckInformation->setInterval(10000);
$healthcheckInformation->setRecreateStrategy();
$this->addExtraInformation($healthcheckInformation);
}

Expand Down

0 comments on commit da51d47

Please sign in to comment.