@lpgroup/feathers-k8s-probe-services

Healthy and ready propbe services needed by kubernetes (k8s).

Usage no npm install needed!

<script type="module">
  import lpgroupFeathersK8sProbeServices from 'https://cdn.skypack.dev/@lpgroup/feathers-k8s-probe-services';
</script>

README

@lpgroup/feathers-k8s-probe-services

npm version Known Vulnerabilities Licence MIT tested with jest codecov

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