GithubHelp home page GithubHelp logo

glebiller / action-setup-kube-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yokawasa/action-setup-kube-tools

0.0 2.0 0.0 357 KB

Github Action that setup Kubernetes tools (kubectl, kustomize, helm, kubeval, conftest, yq, rancher, tilt, skaffold) very fast and cache them on the runner. Please [✩Star] if you're using it!

License: MIT License

TypeScript 100.00%

action-setup-kube-tools's Introduction

action-setup-kube-tools status

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 with no command input param, but as compared with it, it's very fast as it installs the tools asynchronously.

Usage

Inputs

Parameter Required Default Value Description
fail-fast false true the action immediately fails when it fails to download (ie. due to a bad version)
setup-tools false "" List of tool name to setup. By default, the action download and setup all supported Kubernetes tools. By specifying setup-tools you can choose which tools the action setup. Supported separator is return in multi-line string. Supported tools are kubectl, kustomize, helm, helmv3, kubeval, conftest, yq, rancher, tilt, skaffold, kube-score
kubectl false 1.20.2 kubectl version. kubectl vesion can be found here
kustomize false 4.0.5 kustomize version. kustomize vesion can be found here
helm false 2.17.0 helm version. helm vesion can be found here
helmv3 false 3.5.2 helm v3 version. helm v3 vesion can be found here
kubeval false 0.16.1 kubeval version (must be 0.16.1+). kubeval vesion can be found here
conftest false 0.19.0 conftest version. conftest vesion can be found here
yq false 4.7.1 yq version. yq vesion can be found here
rancher false 2.4.10 Rancher CLI version. Rancher CLI vesion can be found here
tilt false 0.18.11 Tilt version. Tilt vesion can be found here
skaffold false 1.20.0 Skaffold version. Skaffold vesion can be found here
kube-score false 1.10.1 kube-score version. kube-score vesion can be found here
  • Supported Environments: Linux
  • From v0.7.0, the action supports tool version 'v' prefix. Prior to v0.7.0, the action only accept the tool version without 'v' prefix but from v0.7.0 the action automatically add/remove the prefix as necessary

Outputs

Parameter Description
kubectl-path kubectl command path if the action setup the tool, otherwise empty string
kustomize-path kustomize command path if the action setup the tool, otherwise empty string
helm-path helm command path if the action setup the tool, otherwise empty string
helmv3-path helm v3 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
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
tilt-path rancher command path if the action setup the tool, otherwise empty string
skaffold-path rancher command path if the action setup the tool, otherwise empty string
kube-score-path: rancher command path if the action setup the tool, otherwise empty string

Sample Workflow

Specific versions for the commands can be setup by adding inputs parameters like this:

  test: 
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: yokawasa/[email protected]
      with:
        kubectl: '1.17.1'
        kustomize: '3.7.0'
        helm: '2.16.7'
        helmv3: '3.5.2'
        kubeval: '0.16.1'
        conftest: '0.18.2'
        rancher: '2.4.10'
        tilt: '0.18.11'
        skaffold: '1.20.0'
        kube-score: '1.10.1'
    - run: |
        kubectl version --client
        kustomize version
        helm version --client
        helmv3 version
        kubeval --version
        conftest --version
        yq --version
        rancher --version
        tilt version
        skaffold version
        kube-score version

Default versions for the commands will be setup if you don't give any inputs like this:

  test: 
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: yokawasa/[email protected]
    - run: |
        kubectl version --client
        kustomize version
        helm version --client
        helmv3 version
        kubeval --version
        conftest --version
        yq --version
        rancher --version
        tilt version
        skaffold version
        kube-score version

By specifying setup-tools you can choose which tools the action setup. Supported separator is return in multi-line string like this

  test: 
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: yokawasa/[email protected]
      with:
        setup-tools: |
          kubectl
          helmv3
          kustomize
          skaffold
        kubectl: '1.17.1'
        helmv3: '3.5.2'
        kustomize: '3.7.0'
        skaffold: '1.20.0'
    - run: |
        kubectl version --client
        kustomize version
        helmv3 version
        skaffold version

Developing the action

Install the dependencies

npm install

Build the typescript and package it for distribution by running ncc

npm run build && npm run format && npm run lint && npm run pack

Finally push the results

git add dist
git commit -a -m "prod dependencies"
git push origin releases/v0.7.1

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yokawasa/action-setup-kube-tools

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.