@lpgroup/feathers-k8s-probe-services
v1.9.1
Published
Healthy and ready propbe services needed by kubernetes (k8s).
Downloads
82
Readme
@lpgroup/feathers-k8s-probe-services
Kubernetes (k8s) probe services for Feathers exposed on /healthy and /ready
They will both return 404 and the text specified in the config file.
Will start to send 200 ok after app.set("status").ready = "OK"
is
executed
Install
Installation of the npm
npm install @lpgroup/feathers-k8s-probe-services
Usage
In config/default.json
add the following.
{
"status": {
"ready": "NOT-STARTED"
}
}
In src/servies/index.js
const { ready, healthy } = require("@lpgroup/feathers-k8s-probe-services");
app.configure(ready);
app.configure(healthy);
In src/index.js
server.on("listening", async () => {
app.set("status").ready = "OK";
});
Contribute
See contribute
License
MIT - See licence