一个Python包,用于更新本地Helm图表的依赖关系
helm-upgrade的Python项目详细描述
舵手升级
Status | |
---|---|
CI Tests | |
Black | |
Flake8 |
你管理的舵图依赖于其他舵图吗?
你厌倦了手动更新这些依赖项吗?
那这就是你的工具!
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
将:
- 从
requirements.yaml
文件中读取依赖项的当前版本 - 从提供的url(在JSON模式中)到
dependencies
参数查找所需依赖项的最新版本 - 比较这些版本是否相等
- 如果版本不相等(并且
--dry-run
标志尚未设置),requirements.yaml
将被新图表版本覆盖。在
--verbose
标志将把日志打印到控制台,--dry-run
标志将跳过文件写入步骤。在
:法轮:远程舵图
helm-upgrade
当前可识别来自三种类型主机的图表版本。在
- 在
来自另一个GitHub存储库的
Chart.yaml
文件。 这些URL以“/Chart.yaml
”结尾。在例如,https://raw.githubusercontent.com/helm/charts/master/stable/nginx-ingress/Chart.yaml
在 - 在
GitHub页面上托管的图表版本存储库。 这些URL包含“
/gh-pages/
”。在例如,https://raw.githubusercontent.com/jupyterhub/helm-chart/gh-pages/index.yaml
在 - 在
GitHub发布页面上列出的版本。 这些url以“
在/releases/latest
”结尾,并使用BeautifulSoup
来搜索html。在
:火花:贡献
:塔达:感谢您的参与!:塔达: 一定要阅读我们的Code of Conduct和Contributing Guidelines来开始。在
- 项目
标签: