<p align="center">
<a href="https://github.com/yokawasa/action-setup-kube-tools/actions"><img alt="action-setup-kube-tools status" src="https://github.com/yokawasa/action-setup-kube-tools/workflows/build-test/badge.svg"></a>
</p>
# action-setup-kube-tools
A GitHub Action that setup Kubernetes tools (kubectl, kustomize, helm, kubeval, conftest, yq, rancher) and cache them on the runner. It is like a typescript version of [stefanprodan/kube-tools](https://github.com/stefanprodan/kube-tools) with no command input param, but as compared with [it](https://github.com/stefanprodan/kube-tools), it's **very fast** as it installs the tools asynchronously.
## Usage
### Inputs
|Parameter|Required|Default Value|Description|
|:--:|:--:|:--:|:--|
|`kubectl`|`false`|`1.18.2`| kubectl version. kubectl vesion can be found [here](https://github.com/kubernetes/kubernetes/releases)|
|`kustomize`|`false`|`3.5.5`| kustomize version. kustomize vesion can be found [here](https://github.com/kubernetes-sigs/kustomize/releases)|
|`helm`|`false`|`2.16.7`| helm version. helm vesion can be found [here](https://github.com/helm/helm/releases)|
|`helmv3`|`false`|`3.2.1`| helm v3 version. helm v3 vesion can be found [here](https://github.com/helm/helm/releases)|
|`kubeval`|`false`|`0.15.0`| kubeval version. kubeval vesion can be found [here](https://github.com/instrumenta/kubeval/releases)|
|`conftest`|`false`|`0.19.0`| conftest version. conftest vesion can be found [here](https://github.com/open-policy-agent/conftest/releases)|
|`rancher`|`false`|`2.4.10`| Rancher CLI version. Rancher CLI vesion can be found [here](https://github.com/rancher/cli/releases)|
> Supported Environments: Linux
### Outputs
|Parameter|Description|
|:--:|:--|
|`kubectl_path`| kubectl command path |
|`kustomize_path`| kustomize command path |
|`helm_path`| helm command path |
|`helmv3_path`| helm v3 command path |
|`kubeval_path`| kubeval command path |
|`conftest_path`| conftest command path |
|`yq_path`| yq command path |
|`rancher_path`| rancher command path |
### Sample Workflow
Specific versions for the commands can be setup by adding inputs parameters like this:
```yaml
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: yokawasa/action-setup-kube-tools@v0.3.0
with:
kubectl: '1.17.1'
kustomize: '3.7.0'
helm: '2.16.7'
helmv3: '3.2.4'
kubeval: '0.14.0'
conftest: '0.18.2'
rancher: '2.4.10'
id: setup
- run: |
kubectl version --client
kustomize version
helm version --client
helmv3 version
kubeval --version
conftest --version
yq --version
rancher --version
```
Default versions for the commands will be setup if you don't give any inputs like this:
```yaml
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: yokawasa/action-setup-kube-tools@v0.3.0
id: setup
- run: |
kubectl version --client
kustomize version
helm version --client
helmv3 version
kubeval --version
conftest --version
yq --version
rancher --version
```
## Developing the action
Install the dependencies
```bash
npm install
```
Build the typescript and package it for distribution by running [ncc](https://github.com/zeit/ncc)
```bash
npm run build && npm run pack
```
Finally push the resutls
```
git add dist
git commit -a -m "prod dependencies"
git push origin releases/v0.3.0
```
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/yokawasa/action-setup-kube-tools
长迦
- 粉丝: 40
- 资源: 4660
最新资源
- STM32和BH1750光照传感器和IIC总线通讯OLED显示程序源码,通过BH1750,光照传感器采集光照信息,通过oled显示光照值 包括程序源码和原理图,程序源码注释详细需要的可以看下
- 基于JAVA语言的国货美妆店管理系统源码(java毕业设计完整源码+LW).zip
- 中专文件专用,不是大家不要下载
- Internet Download Manager 6.42 Build 18 Multilingual
- HFI高频方波注入方案stm32f405 无感FOC控制 直接闭环启动 永磁同步电机无感控制,0速带载启动,堵转保持扭矩 低速HFI, 高速SMO,全速域运行 基于stm32f405 高频注入
- java小区门户网站源代码.zip
- java小区物业管理系统源代码.zip
- 中专文件专用,请大家不要下载
- csvtofbx的exe工具
- S7-1200 4层电梯仿真模拟程序 软件:博图V15 PLC:S7-1200 触摸屏:KTP900 给想做电梯朋友参考,可直接模拟运行 楼层显示,上下楼指示,内外呼梯 乘客上下电梯时的按钮即可
- 基于ssm的毕业生离校未就业管理系统的设计与实现源码(java毕业设计完整源码+LW).zip
- 数据分析-56-旧金山员工薪水探索性分析(包含代码和数据)
- 一种半自动弯折机sw18可编辑全套技术资料100%好用.zip
- java一个简单的即时通讯工具的设计与开发源代码.zip
- 基于python的疫情数据爬虫+微博关键词爬虫(数据库)+数据预处理及可视化数据情感分析源码+文档说明
- 组合式空调设备PLC程序,采用西门子1200PLC+485通讯+触摸屏TP系列+电气原理图组成的,程序架构清晰; 恒温恒湿PID精准控制,带通讯,多种模式,带触摸屏程序,动态画面 很值得学习和参考,工
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0