一个Python包,用于更新本地Helm图表的依赖关系

helm-upgrade的Python项目详细描述


舵手升级

PyPI version

Status
CI TestsCI-test
BlackBlack
Flake8Flake8

你管理的舵图依赖于其他舵图吗? 你厌倦了手动更新这些依赖项吗? 那这就是你的工具! helm-upgrade是一个Python命令行界面(CLI),可以自动更新本地Helm图表的依赖项。在

这个工具的灵感来自HelmUpgradeBot和{a3}。在

目录


:火箭:安装

建议将Python3.7版与此工具一起使用。在

:snake:pip

pip install helm-upgrade

:扳手:手动

首先,克隆这个存储库并将其更改为它。在

^{pr2}$

使用Python安装需求和包。 建议使用Python3.7。在

python -m pip install -r requirements.txt
python setup.py install

通过调用帮助页测试安装。在

helm-upgrade --help

:回收:使用

usage: helm-upgrade [-h] {version,run} ...
Update the dependencies of a local Helm Chart in a project repository.

positional arguments:
  {version,run}
    version      Print the version and exit
    run          Update the dependencies of a helm chart

optional arguments:
  -h, --help     show this help message and exit
usage: helm-upgrade version [-h]

optional arguments:
  -h, --help  show this help message and exit
usage: helm-upgrade run [-h][--dry-run][-v] chart dependencies

positional arguments:
  chart          Name of the local Helm Chart to be updated.
  dependencies   A dictionary of Helm Chart dependencies and their host repo
                 URLs. E.g. '{"nginx-ingress": "https://raw.githubusercontent.                 com/helm/charts/master/stable/nginx-ingress/Chart.yaml"}'

optional arguments:
  -h, --help     show this help message and exit
  --dry-run      Perform a dry run of the update. Don't write the changes to a
                 file.
  -v, --verbose  Option to turn on logging.

在本地helm图表上方的目录中运行CLI。 例如:

$ ls -R -1

./my-local-helm-chart:
Chart.yaml
README.md
requirements.yaml
templates/
values.yaml

在这个例子中,name参数将是my-local-helm-chart。在

helm-upgrade将:

  1. requirements.yaml文件中读取依赖项的当前版本
  2. 从提供的url(在JSON模式中)到dependencies参数查找所需依赖项的最新版本
  3. 比较这些版本是否相等
  4. 如果版本不相等(并且--dry-run标志尚未设置),requirements.yaml将被新图表版本覆盖。在

--verbose标志将把日志打印到控制台,--dry-run标志将跳过文件写入步骤。在

:法轮:远程舵图

helm-upgrade当前可识别来自三种类型主机的图表版本。在

  1. 来自另一个GitHub存储库的Chart.yaml文件。 这些URL以“/Chart.yaml”结尾。在

    例如,https://raw.githubusercontent.com/helm/charts/master/stable/nginx-ingress/Chart.yaml

  2. GitHub页面上托管的图表版本存储库。 这些URL包含“/gh-pages/”。在

    例如,https://raw.githubusercontent.com/jupyterhub/helm-chart/gh-pages/index.yaml

  3. GitHub发布页面上列出的版本。 这些url以“/releases/latest”结尾,并使用BeautifulSoup来搜索html。在

    例如,https://github.com/jetstack/cert-manager/releases/latest

:火花:贡献

:塔达:感谢您的参与!:塔达: 一定要阅读我们的Code of ConductContributing Guidelines来开始。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
使用php调用java web服务时无法获取输出   java Netbeans:安装IMlet时出错。。。。仿真器错误   初始化期间Eclipse Juno SR 2中的java堆栈溢出   java在3d中寻找两个任意立方体的交集   代码中显示java“org.openqa.selenium.WebDriverException”错误   java使用AtomicInteger作为可变整数的替代品是一种好的做法吗?   当以编程方式设置背景颜色时,java版面在更新后会自动复制   java将字符串拆分为一个带有数字数据的字符串和另一个带有非数字数据的字符串   带有SSL协议的java AsyncHttpClient   C++服务器HTTN到java NtoHS客户端转换   java内存分配是基于引用类还是实例类?   java使用ProjectLombok安全吗?   grails“java版本”在命令提示符下不工作   java无法使用axis2实例化类型ADBDataSource   在Play Framework 2中进行多文件上传的java示例   java如何将二进制补码字符串转换为负十进制数?   windows 7在Java中获取不正确的操作系统名称   java如何禁用p:commandButton的enter键?   java如何从main方法加载servlet   java如何从imageView获取二进制位图