Giter VIP home page Giter VIP logo

autohelm's Introduction

autohelm

Command line helper for helm. This utility adds to the functionality of Helm in multiple ways:

  • Creates a declarative syntax to manage multiple releases in one place
  • Allows installation of charts from a git commit/branch/release

Requirements

  • python >= 2.7
  • helm: installed and inited
  • $INFRASTRUCTURE_REPO

Installation

As standalone shell command

As Helm plugin

Usage

As standalone shell command

  • Usage: autohelm [OPTIONS] COMMAND [ARGS]...
  • Options:
    • --help Show this message and exit.
    • --log-level=TEXT Set the log level for autohelm (defaults to INFO. Set to DEBUG for more details including helm commands)
  • Commands:
    • plot FILE: Runs helm based on specified yaml file (see configuration example below)
      • Options:
        • --debug: Pass --debug to helm
        • --dry-run: Pass --dry-run to helm so no action is taken. Also includes --debug
        • --heading <chart>: Run only the specified chart out of the course.yml
        • --local-development: Run autohelm in local-development mode where Tiller is not required and no helm commands are run. Useful for rapid or offline development.
    • generate: Generates example file course.yml with extensive descriptions
    • version: Output autohelm version

As helm plugin

  • Usage: helm autohelm [OPTIONS] COMMAND [ARGS]...
  • Options: --help Show this message and exit.
  • Commands:
    • plot: Runs helm based on yaml file descriptors
    • Argument:
      • file: YAML file with description of charts to load
    • generate: Generates example file course.yml with extensive descriptions
    • version: Output autohelm version

Example configuration file:

There is an example file in autohelm/example-course.yml

Further customization is documented below.

Options

Global Options

namespace

The default namespace to deploy into. Defaults to kube-system

repository

Repository to download chart from, defaults to 'stable'

repositories

Where to get charts from. We recommend at least the stable and incubator charts.

repositories:
  incubator:
    url: https://kubernetes-charts-incubator.storage.googleapis.com
  stable:
    url: https://kubernetes-charts.storage.googleapis.com

Options for Charts

values

In-line values overrides for this chart. By default these are set using --set. This introduces some interesting behavior. Make sure to read the Caveats

values-strings

This is a wrapper around the helm functionality --set-string. Allows the specification of variables that would normally be interpreted as boolean or int as strings.

charts:
  chartname:
    values:
      some.value: test
    values-strings:
      some.value.that.you.need.to.be.a.string: '1'

files

Use a values file(s) rather than leaving them in-line:

charts:
  chart_name:
    files:
      - /path/to/values/file.yml

namespace

Override the default namespace.

hooks

Hooks are run locally. For complex hooks, use an external script or Runner task.

charts:
  chart_name:
      pre_install:
        - ls
        - env
      post_install:
        - rm testfile
        - cp file1 file2

version

The version of the chart to use

Repository Options

name

Optional, name of repository.

url

Optional if repository is listed above. Url of repository to add if not already included in above repositories section.

git

Git url where chart exists. Supercedes url argument

path

Path where chart is in the git repository. NOTE: If the chart folder is in the root, leave this blank.

charts:
  chart_name:
    repository: repository to download chart from, overrides global value
      name: Optional, name of repository.
      url: Optional if repository is listed above. Url of repository to add if not already included in above repositories section
      git: Git url where chart exists. Supercedes url argument
      path: Path where chart is in git repository. If the chart is at the root, leave blank
    namespace: namespace to install chart in, overrides above value

Caveats

Escaping

Keys and Values that have dots in the name need to be escaped. Have a look at the helm docs on escaping complicated values.

Example:

charts:
  grafana:
    namespace: grafana
    values:
      datasources:
        datasources\.yaml:
          apiVersion: 1

The alternative is to use the files method described above

autohelm's People

Contributors

bfin avatar bjaworski3 avatar coreypobrien avatar geojaz avatar mrproper avatar

Watchers

 avatar  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.