@datapio/sdk-k8s-operator
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

Datapio SDK Kubernetes Operator

The Datapio SDK Kubernetes Operator provides a declarative way to interact with a Kubernetes Cluster and watch resources.

It allows you to:

  • watch Kubernetes resources
  • expose a HealthCheck for Kubernetes Readiness/Liveness Probes on /health
  • expose a Metrics endpoint for Prometheus on /metrics (soon)
  • expose a GraphQL API on /graphql
  • expose a custom HTTP API on /api
  • endpoint listenning on HTTP(S)

Installation

$ npm install @datapio/sdk-k8s-operator

Usage

The SDK provides an Operator class that you can inherit from:

import { Operator } from '@datapio/sdk-k8s-operator'

class MyOperator extends Operator {
  constructor() {
    super({
      /* options */
    })
  }
}

You can then instantiate and use your operator:

const operator = new MyOperator()

// start the operator
await operator.service.listen()

/@datapio/sdk-k8s-operator/

    Package Sidebar

    Install

    npm i @datapio/sdk-k8s-operator

    Weekly Downloads

    0

    Version

    2.0.1

    License

    Apache-2.0

    Unpacked Size

    165 kB

    Total Files

    112

    Last publish

    Collaborators

    • linkdd