Skip to content

Commit

Permalink
Merge pull request #35 from yokawasa/support-kubeconform
Browse files Browse the repository at this point in the history
Support kubeconform
  • Loading branch information
yokawasa authored Oct 25, 2022
2 parents f68236f + 9300d35 commit b7355a1
Show file tree
Hide file tree
Showing 7 changed files with 628 additions and 2,261 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
helm version --client
helm version
kubeval --version
kubeconform -v
conftest --version
yq --version
rancher --version
Expand All @@ -39,6 +40,7 @@ jobs:
helm=${{steps.setup.outputs.helm-path}}
helmv2=${{steps.setup.outputs.helmv2-path}}
kubeval=${{steps.setup.outputs.kubeval-path}}
kubeconform=${{steps.setup.outputs.kubeconform-path}}
conftest=${{steps.setup.outputs.conftest-path}}
yq=${{steps.setup.outputs.yq-path}}
rancher=${{steps.setup.outputs.rancher-path}}
Expand All @@ -51,6 +53,7 @@ jobs:
${helm} version
${helmv2} version --client
${kubeval} --version
${kubeconform} -v
${conftest} --version
${yq} --version
${rancher} --version
Expand All @@ -69,6 +72,7 @@ jobs:
helm: '3.2.4'
helmv2: '2.16.7'
kubeval: '0.16.1'
kubeconform: '0.5.0'
conftest: '0.18.2'
yq: '4.7.1'
rancher: '2.4.10'
Expand All @@ -82,6 +86,7 @@ jobs:
helm version
helmv2 version --client
kubeval --version
kubeconform -v
conftest --version
yq --version
rancher --version
Expand All @@ -94,6 +99,7 @@ jobs:
helm=${{steps.setup.outputs.helm-path}}
helmv2=${{steps.setup.outputs.helmv2-path}}
kubeval=${{steps.setup.outputs.kubeval-path}}
kubeconform=${{steps.setup.outputs.kubeconform-path}}
conftest=${{steps.setup.outputs.conftest-path}}
yq=${{steps.setup.outputs.yq-path}}
rancher=${{steps.setup.outputs.rancher-path}}
Expand All @@ -106,6 +112,7 @@ jobs:
${helm} version
${helmv2} version --client
${kubeval} --version
${kubeconform} -v
${conftest} --version
${yq} --version
${rancher} --version
Expand Down Expand Up @@ -140,6 +147,7 @@ jobs:
helm=${{steps.setup.outputs.helm-path}}
helmv2=${{steps.setup.outputs.helmv2-path}}
kubeval=${{steps.setup.outputs.kubeval-path}}
kubeconform=${{steps.setup.outputs.kubeconform-path}}
conftest=${{steps.setup.outputs.conftest-path}}
yq=${{steps.setup.outputs.yq-path}}
rancher=${{steps.setup.outputs.rancher-path}}
Expand All @@ -162,6 +170,9 @@ jobs:
if [ ! -z ${kubeval} ]; then
${kubeval} --version
fi
if [ ! -z ${kubeconform} ]; then
${kubeconform} -v
fi
if [ ! -z ${conftest} ]; then
${conftest} --version
fi
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the "action-setup-kube-tools" will be documented in this file.

## v0.9.0

- Support [kubeconform](https://github.com/yannh/kubeconform) - [[#32](https://github.com/yokawasa/action-setup-kube-tools/issues/32)]

## v0.8.3

- Upgrade to Node 16 and upgrade GitHub libs by @yhrn in [#31](https://github.com/yokawasa/action-setup-kube-tools/pull/31)
Expand Down
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</p>

# action-setup-kube-tools
A GitHub Action that setup Kubernetes tools (kubectl, kustomize, helm, kubeval, conftest, yq, rancher, tilt, skaffold, kube-score) 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.
A GitHub Action that setup Kubernetes tools (kubectl, kustomize, helm, kubeconform, conftest, yq, rancher, tilt, skaffold, kube-score) 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

Expand All @@ -17,7 +17,8 @@ A GitHub Action that setup Kubernetes tools (kubectl, kustomize, helm, kubeval,
|`kustomize`|`false`|`4.0.5`| kustomize version. kustomize vesion can be found [here](https://github.com/kubernetes-sigs/kustomize/releases)|
|`helm`|`false`|`3.6.3`| helm v3 version. helm vesion can be found [here](https://github.com/helm/helm/releases)|
|`helmv2`|`false`|`2.17.0`| helm v2 version. helm v3 vesion can be found [here](https://github.com/helm/helm/releases)|
|`kubeval`|`false`|`0.16.1`| kubeval version (must be **0.16.1+**). kubeval vesion can be found [here](https://github.com/instrumenta/kubeval/releases)|
|`kubeval`|`false`|`0.16.1`| kubeval version (must be **0.16.1+**). kubeval vesion can be found [here](https://github.com/instrumenta/kubeval/releases).<br> NOTE: this parameter is deprecating as `kubeval` is no longer maintained. A good replacement is [kubeconform](https://github.com/yannh/kubeconform). See also [this](https://github.com/instrumenta/kubeval) for more details.|
|`kubeconform`|`false`|`0.5.0`| kubeconform version. kubeconform vesion can be found [here](https://github.com/yannh/kubeconform/releases)|
|`conftest`|`false`|`0.19.0`| conftest version. conftest vesion can be found [here](https://github.com/open-policy-agent/conftest/releases)|
|`yq`|`false`|`4.7.1`| yq version. yq vesion can be found [here](https://github.com/mikefarah/yq/releases/)|
|`rancher`|`false`|`2.4.10`| Rancher CLI version. Rancher CLI vesion can be found [here](https://github.com/rancher/cli/releases)|
Expand All @@ -36,6 +37,7 @@ A GitHub Action that setup Kubernetes tools (kubectl, kustomize, helm, kubeval,
|`helm-path`| helm command path if the action setup the tool, otherwise empty string |
|`helmv2-path`| helm v2 command path if the action setup the tool, otherwise empty string |
|`kubeval-path`| kubeval command path if the action setup the tool, otherwise empty string |
|`kubeconform-path`| kubeconform command path if the action setup the tool, otherwise empty string |
|`conftest-path`| conftest command path if the action setup the tool, otherwise empty string |
|`yq-path`| yq command path if the action setup the tool, otherwise empty string |
|`rancher-path`| rancher command path if the action setup the tool, otherwise empty string |
Expand All @@ -52,13 +54,13 @@ Specific versions for the commands can be setup by adding inputs parameters like
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: yokawasa/action-setup-kube-tools@v0.8.3
- uses: yokawasa/action-setup-kube-tools@v0.9.0
with:
kubectl: '1.17.1'
kustomize: '3.7.0'
helm: '3.5.2'
helmv2: '2.16.7'
kubeval: '0.16.1'
kubeconform: '0.5.0'
conftest: '0.18.2'
rancher: '2.4.10'
tilt: '0.18.11'
Expand All @@ -69,7 +71,7 @@ Specific versions for the commands can be setup by adding inputs parameters like
kustomize version
helm version
helmv2 version --client
kubeval --version
kubeconform -v
conftest --version
yq --version
rancher --version
Expand All @@ -85,13 +87,13 @@ Default versions for the commands will be setup if you don't give any inputs lik
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: yokawasa/action-setup-kube-tools@v0.8.3
- uses: yokawasa/action-setup-kube-tools@v0.9.0
- run: |
kubectl version --client
kustomize version
helm version
helmv2 version --client
kubeval --version
kubeconform -v
conftest --version
yq --version
rancher --version
Expand All @@ -107,7 +109,7 @@ By specifying setup-tools you can choose which tools the action setup. Supported
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: yokawasa/action-setup-kube-tools@v0.8.3
- uses: yokawasa/action-setup-kube-tools@v0.9.0
with:
setup-tools: |
kubectl
Expand Down Expand Up @@ -142,7 +144,7 @@ Finally push the results
```
git add dist
git commit -a -m "prod dependencies"
git push origin releases/v0.8.3
git push origin releases/v0.9.0
```

## Contributing
Expand Down
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Setup Kubernetes Tools'
description: 'Setup Kubernetes tools: kubectl, kustomize, helm, kubeval, conftest, yq, rancher, tilt, skaffold, kube-score'
description: 'Setup Kubernetes tools: kubectl, kustomize, helm, kubeconform, conftest, yq, rancher, tilt, skaffold, kube-score'
author: 'Yoichi Kawasaki @yokawasa'
inputs:
fail-fast:
Expand Down Expand Up @@ -30,6 +30,10 @@ inputs:
required: false
default: '0.16.1'
description: 'kubeval version'
kubeconform:
required: false
default: '0.5.0'
description: 'kubeconform version'
conftest:
required: false
default: '0.19.0'
Expand Down
Loading

0 comments on commit b7355a1

Please sign in to comment.