node-helm

Node.JS bindings for helm

Stars
0

Node-Helm

Getting Started

This library will automatically download the helm binary for your system when possible and co-locate it on install. If you wish to disable this behavior you can set the environment variable NODE_HELM_SKIP_DOWNLOAD to true or disable the script execution using npm's --ignore-scripts. However, if you do this you are responsible for providing a compatible helm binary.

If you wish to validate how the binary is downloaded see: here

To install this library run npm install --save @bryopsida/helm

In your app,

Start by adding the import

CommonJS

const { Helm } = require('@bryopsida/helm')

ESM

import { Helm } from '@bryopsida/helm'

Creating an instance

Defaults

const helm = new Helm()

Specify helm binary

const helm = new Helm({
    binaryPath: <path to your helm3 binary>
})

Listing Helm Releases

const releases = await helm.list({
  all: true,
  allNamespaces: true,
})
console.log('==== Helm Releases ====')
releases.forEach((release) => {
  console.log(`Name = ${release.name}`)
  console.log(`Namespace = ${release.namespace}`)
  console.log(`Chart = ${release.chart}`)
  console.log(`Status = ${release.status}`)
})
console.log('==== End Helm Releases ====')