Giter Club home page Giter Club logo

node-helm's Introduction

node-helm

node-helm was created for javascript developers who work with helm.sh package manager for Kubernetes. The package is a wrapper that integrates with the helm.sh process.

Installation

npm install node-helm

Get Started

Setup your helm.sh file location - for linux or windows

let helmBinary = '/usr/local/bin/helm';

if (process.platform === "win32") {
    helmBinary = 'helm';
}

require Helm class

const Helm = require("node-helm").Helm;
var helm = Promise.promisifyAll(new Helm({helmCommand: helmBinary}));

API

List releases

https://docs.helm.sh/helm/#helm-list

    let options = {}; //No options available currently
    let releases = await helm.listAsync(options);  

Get a release

https://docs.helm.sh/helm/#helm-get

    let options = {
        releaseName = 'service';
    }
    let history = await helm.getAsync(options);  

Install a service

https://docs.helm.sh/helm/#helm-install

let options = {
    chartName: "CHARTNAME",
    releaseName: "SERVICENAME",        
    namespace: "dev",        
    //custom values
    values: {
        "authKey":"20FD87EA-A679-4817-AFA4-E5CC17712456"
    }
};
return installation = await helm.installAsync(options);  

Upgrade a service

https://docs.helm.sh/helm/#helm-upgrade

    return await helm.upgradeAsync({
        reuseValues : shouldReuseValues, //boolean value
        chartName: "./ChartFolder",
        releaseName: SERVICENAME,
        values: {
            "authKey":"20FD87EA-A679-4817-AFA4-E5CC17712456"
        }
    });  

Delete a service

https://docs.helm.sh/helm/#helm-delete

    var options = {
        shouldPurge : true,
        releaseName: 'service'
    }
    return await helm.deleteAsync(options);

Get release history

https://docs.helm.sh/helm/#helm-history

    let options = {
        releaseName = 'service';
    }
    let history = await helm.historyAsync(options);  

Test a release

https://docs.helm.sh/helm/#helm-test

    let options = {
        releaseName = 'service'
    }
    let test = await helm.testAsync(options);  

Rollback a release to a previous revision

https://docs.helm.sh/helm/#helm-rollback

    let options = {
        releaseName = 'service',
        revision: 0
    };
    let rollback = await helm.rollbackAsync(options);  

Get a release status

https://docs.helm.sh/helm/#helm-status

    let options = {
        releaseName = 'service';
    }
    let status = await helm.statusAsync(options);  

Release Notes

    19/02/19 - 
        1. Add basic parent options support to all commands
        2. Use esversion 6 typing

    11/02/19 - 
        1. Add 3 methods: test,status,rollback
        2. Update README
        3. Update LICENSE

    10/02/19 - 
        1.Added native object json response for some commands
        2.Added get release method support
        3.All methods are now using options variable

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.