Git Product home page Git Product logo

helm-py's Introduction

helm-wrap

Python wrapper for Helm binary

Usage

from helm_wrap import helm

h = helm.Helm(o='json')
lst = h.list()
lst.raise_for_status()

print(lst.json)

helm-py's People

Contributors

myback avatar

Watchers

 avatar

helm-py's Issues

Helm pull command construction seems to be wrong

Dear maintainer,

As I started using this library, I discovered another issue, this time with helm pull. Here is my code:

from helm_wrap import helm


def download_charts(source_repo, source_chart):
    chart_name = source_chart
    source_chart = helm.Helm()
    source_chart.pull(chart=chart_name, repo=source_repo)

It uses the pull method to pull a chart locally. However, what ends up happening is the following:

CompletedProcess(args=('/usr/local/bin/helm', 'pull', '--chart=cluster-autoscaler', '--repo=https://kubernetes.github.io/autoscaler'), returncode=1, stdout='', stderr='Error: unknown flag: --chart\n')

That is because the following wrong command gets constructed:

helm pull --chart=cluster-autoscaler --repo=https://kubernetes.github.io/autoscaler  

instead of the right one:

helm pull cluster-autoscaler --repo=https://kubernetes.github.io/autoscaler 

I tried to find out where the bogus --chart= flag is coming to prepare a fix from but I did not succeed.

ImportError: cannot import name 'ExecWrapper' from 'wrapper' (/home/UserName/.local/lib/python3.10/site-packages/wrapper/__init__.py)

Hi,

I really like the library, looking at the objects it does exactly what I want. However, I have a bit of an issue with the dependencies.

I am on:

python3 --version
Python 3.10.12

I import the package and initialize the class into an object like so:

from helm_wrap import helm

def helm_template(helm_chart):
    helm_chart = helm.Helm()
    helm_chart.template()

Although when I run the code I run into this error:

/bin/python3 /home/myuser/codebase/project-helm-docker/helm_template.py
Traceback (most recent call last):
  File "/home/myuser/codebase/project-helm-docker/helm_template.py", line 2, in <module>
    from helm_wrap import helm
  File "/home/myuser/.local/lib/python3.10/site-packages/helm_wrap/helm.py", line 1, in <module>
    from wrapper import ExecWrapper

I have the wrapper dep installed by pip:

pip install wrapper
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: wrapper in /home/myuser/.local/lib/python3.10/site-packages (1.1.0b1)

Could you lend a hand please?

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.