• Stars
    star
    106
  • Rank 324,308 (Top 7 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python bindings for Helm

PyHelm

Python bindings for the Helm package manager

How to use PyHelm

In order to install a Helm chart using PyHelm, you can perform the following steps:

Loading a chart using ChartBuilder

from pyhelm.chartbuilder import ChartBuilder

chart = ChartBuilder({"name": "nginx-ingress", "source": {"type": "repo", "location": "https://kubernetes-charts.storage.googleapis.com"}})

This will cause the chart to cloned locally, and any additional use of chart will reference the local copy. You can also used a local chart by using "type": "directory", as well as cloning from a git repo using "type": "git"

Installing a chart

from pyhelm.chartbuilder import ChartBuilder
from pyhelm.tiller import Tiller

tiller = Tiller(TILLER_HOST)
chart = ChartBuilder({"name": "nginx-ingress", "source": {"type": "repo", "location": "https://kubernetes-charts.storage.googleapis.com"}})
tiller.install_release(chart.get_helm_chart(), dry_run=False, namespace='default')

This snippet will install the nginx-ingress chart on a Kubernetes cluster where Tiller is installed (assuming TILLER_HOST points to a live Tiller instance). Take note that in most Helm installations Tiller isn't accessible in such a manner, and you will need to perform a Kubernetes port-forward operation to access Tiller. The Tiller class supports other operations other than installation, including release listing, release updating, release uninstallation and getting release contents.

Package versions

In order to support multiple versions of Helm versions, which in turn require different gRPC prototypes, we maintain different PyHelm package versions.

Helm version PyHelm dependency version
2.11 (and lower) pyhelm>=2.11,<2.12
2.14 pyhelm>=2.14,<2.15

Additional Helm versions can be supported as shown in the following section.

Helm gRPC

The helm gRPC libraries are located in the hapi directory. They were generated with the grpc_tools.protoc utility against Helm 2.14. Should you wish to re-generate them you can easily do so:

git clone https://github.com/kubernetes/helm ./helm
python -m grpc_tools.protoc -I helm/_proto --python_out=. --grpc_python_out=. _proto/hapi/chart/*
python -m grpc_tools.protoc -I helm/_proto --python_out=. --grpc_python_out=. _proto/hapi/services/*
python -m grpc_tools.protoc -I helm/_proto --python_out=. --grpc_python_out=. _proto/hapi/release/*
python -m grpc_tools.protoc -I helm/_proto --python_out=. --grpc_python_out=. _proto/hapi/version/*

More Repositories

1

meclipse

Eclipse plugin for mongodb
Java
60
star
2

cdr_mongodb

MongoDB CDR backend for Asterisk
C
30
star
3

vagrant-openstack

OpenStack provider for vagrant
Ruby
29
star
4

rust-for-real

Learning rust by example
Rust
17
star
5

rust-asterisk-example

Using Rust to write an asterisk module
C
13
star
6

python-gerrit

Python library for managing Gerrit through ssh
Python
9
star
7

openshift-rust-cart

Rust Cartridge for OpenShift
Shell
8
star
8

asterisk-zmq-manager

An asterisk manager that speaks json and it's based on zmq.
C
8
star
9

gerrit-cli

Gerrit CLI on top of python-gerrit
Python
6
star
10

bugsquasher

A pluggable tool for squashing bugs and tracking down issues
Python
4
star
11

mongodb-pythonvm

PythonVM inside mongodb
C++
4
star
12

phanet

Phanet is a Web-Based Feed Agregator made in PHP. Just trying to keep it alive.
JavaScript
4
star
13

rust-actors

Rust implementation of the Actors Model
Rust
4
star
14

monblog

Half-Static, distributed, GridFS based blog engine.
CSS
3
star
15

rust-proton

Proton bindings for Rust
Rust
3
star
16

torretta

Python
3
star
17

django-nonrel

Git mirror of django-nonrel - non-relational backend support for Django via the new multi-db SQL compiler layer.
Python
3
star
18

rust-ring

Consistent Hashing library for Rust
Rust
3
star
19

obsidian-kaffelogic-plugin

TypeScript
2
star
20

djangotoolbox

Git mirror of djangotoolbox - small set of useful Django tools that are nonrel-compatible.
Python
1
star
21

cookiecutter-marconi-storage

Cookiecutter template to create Marconi store drivers
Python
1
star
22

keystone-k8s-ansible

Ansible roles to deploy keystone on Kubernetes
ApacheConf
1
star
23

mongodb-engine-presentation

A presentation engine based on django and mongodb-engine (POC)
JavaScript
1
star
24

vim-config

this is just my vim configuration & files...
Vim Script
1
star
25

flaper87.github.com

flaper87.github.com
1
star
26

tripleo-undercloud-init-container

Shell
1
star
27

apb-os-helm-mariadb

An Ansible Playbook Bundle for the openstack-helm mariadb chart (POC)
Shell
1
star