1.0.0 • Published 6 years ago

@timelab/pod-ready v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

pod-ready

Mark or check if a pod is ready. Useful for Kubernetes Readiness Probe.

Kubernetes Usage

  readinessProbe:
    exec:
      command:
      - cat
      - /tmp/pod-ready
    initialDelaySeconds: 5
    periodSeconds: 5

or if a more complex handling logic needs to be implemented :

readinessProbe:
  exec:
    command:  # Take care of container WORKDIR when using npx
    - npx
    - -p
    - @timelab/pod-ready
    - is-pod-ready
  initialDelaySeconds: 5
  periodSeconds: 5

Methods

markAsReady: Promise < any >

markAsReadySync

markAsNotReady: Promise < any >

markAsNotReadySync

isReady: Promise < boolean >

isReadySync: boolean

throwIfNotReady: Promise < any >

throwIfNotReadySync