hoodunit / purescript-kubernetes

PureScript client library for the Kubernetes API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

purescript-kubernetes

PureScript client for the Kubernetes API.

Supports Kubernetes API versions up to 1.10.0.

Supports:

  • Basic API calls: reading/creating/deleting deployments/namespaces/pods/whatever
  • Authentication via basic auth, X509 client certificates, or bearer tokens.
  • Client-specified HTTPS server certificates

Missing:

  • Loading local kubeconfig
  • Watch calls
  • Untested: exec, attach, port-forward calls
  • Encodings other than JSON
  • Support for browser environment (works only in Node.js)

Installation

bower install --save purescript-kubernetes

Usage

See the integration test for an example. This deploys and exposes a Hello World pod, pings it, and then tears it all down.

API documentation is published on Pursuit.

Development

Assuming Nix is installed:

nix-shell
npm install
npm run bower -- update --force-latest

# Generate type definitions
npm run build:generation
npm run generate

npm run test:unit

All the nix-shell step does here is install Node.js, so you should also be able to install the version of Node.js in default.nix separately and run with that.

The Kubernetes API types and endpoints are generated from the Kubernetes Swagger definitions in the definitions directory.

Testing

Unit tests:

npm run test:unit

Integration tests:

npm run test:integration:local

About

PureScript client library for the Kubernetes API

License:Apache License 2.0


Languages

Language:PureScript 99.9%Language:JavaScript 0.0%Language:Shell 0.0%Language:Nix 0.0%