a simple, asynchronous javascript client for kuberhealthy synthetic checks.
npm i --save kuberhealthy
const kh = require('kuberhealthy')
// Report failure. Returns Promise.
kh.ReportFailure(['example failure message'])
// Report success. Returns Promise.
kh.ReportSuccess()
NOTE: KH_REPORTING_URL must be set in your env. This is usually done automatically if running as 'khcheck' on kubernetes.
const report = async () => {
try {
await kh.ReportSuccess()
} catch (e) {
console.error(e)
process.exit(1)
}
process.exit(0)
}
report()
- this client was inspired and based from kuberhealthy client js