Giter Site home page Giter Site logo

helm-ts's Introduction

helm-ts

A Node/TypeScript client for Helm. It is modeled after the Helm CLI so if you're already comfortable with the CLI then using this client should be no problem for you.

Examples

Download and install a Helm Chart

With Helm CLI

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-mongodb-release bitnami/mongodb

With helm-ts

await helm.repo.add('bitnami', 'https://charts.bitnami.com/bitnami');
await helm.install('my-mongodb-release', 'bitnami/mongodb');

Uninstall a Helm Chart

With Helm CLI

$ helm uninstall my-mongodb-release

With helm-ts

await helm.uninstall('my-mongodb-release');

List Helm releases

With Helm CLI:

$ helm list

NAME                    NAMESPACE       REVISION        UPDATED                                 STATUS          CHART           APP VERSION
my-mongodb-release      default         1               2020-11-11 22:39:35.585098 -0500 EST    deployed        mongodb-10.0.0  4.4.1           

With helm-ts

const releases: Release[] = await helm.list();
/**
 *  releases =  [
 *    {
 *      name: 'my-mongodb-release',
 *      namespace: 'default',
 *      revision: '1',
 *      updated: '2020-11-11 22:39:35.585098 -0500 EST',
 *      status: 'deployed',
 *      chart: 'mongodb-10.0.0',
 *      app_version: '4.4.1'
 *    }
 *  ]
 */

Rollback a release

Rollbacks a release to the previous revision. It can be used with helm.list() to fetch available release names.

With Helm CLI:

bash
$ helm rollback <release-name>

With helm-ts

await helm.rollback("<release-name>");

Note: Only commands that support json output will return typed objects. Otherwise a string output is returned where present.

Getting started

  1. Install the npm package
$ npm install helm-ts
  1. Import the package into your module
import helm from 'helm-ts';
(async () => {
  const releases = await helm.list({ namespace: 'openfaas' }); // list releases in openfaas namespace
  console.log(releases);
  /**
   * [
   *   {
   *     name: 'openfaas',
   *     namespace: 'openfaas',
   *     revision: '1',
   *     updated: '2020-10-25 22:02:45.325836 -0400 EDT',
   *     status: 'deployed',
   *     chart: 'openfaas-6.0.4',
   *     'app_version': ''
   *   }
   * ]
   */
})();

Roadmap

This project is currently a WIP. I will be mostly focused on implementing the most commonly used helm commands first.

If there is a flag or command that you would like implemented, please reach out and let me know! I would be happy to implement it for you.

helm-ts's People

Contributors

kturcios avatar nthings avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.