Skip to content

Commit

Permalink
Merge pull request #677 from penguincoder/opensearch-readiness-probe
Browse files Browse the repository at this point in the history
opensearch readiness probe
  • Loading branch information
domenkozar committed Jun 21, 2023
2 parents d3e12ab + 8489059 commit 30964ec
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/modules/services/opensearch.nix
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,21 @@ in
config = mkIf cfg.enable {
env.OPENSEARCH_DATA = config.env.DEVENV_STATE + "/opensearch";

processes.opensearch.exec = "${startScript}";
processes.opensearch = {
exec = "${startScript}";

process-compose = {
readiness_probe = {
exec.command = "${pkgs.curl}/bin/curl -f -k http://${cfg.listenAddress}:${toString cfg.port}";
initial_delay_seconds = 15;
period_seconds = 10;
timeout_seconds = 2;
success_threshold = 1;
failure_threshold = 5;
};

availability.restart = "on_failure";
};
};
};
}

0 comments on commit 30964ec

Please sign in to comment.