Skip to content

the-type-founders/container-well-being

Repository files navigation

Container Well-being

The package provides standard checks and probes for containers on Kubernetes.

Installation

npm install @thetypefounders/container-well-being --save

Usage

import { Status } from '@thetypefounders/container-well-being';
import express from 'express';

const status = new Status({
  // The host to bind to.
  host: '0.0.0.0',
  // The port to listen to.
  port: 9000,
  // The time to wait after SIGTERM before failing the readiness probe.
  graceBeforeSeconds: 120,
  // The time to wait after failing the readiness probe before shutting down.
  graceAfterSeconds: 80,
});

const app = express();

const server = app
  .listen(8080, '0.0.0.0', () => {
    status.start();
  })
  .on('error', (error) => {
    status.stop();
  });

About

Standard checks and probes for containers on Kubernetes

Resources

Stars

Watchers

Forks