Skip to content

Commit

Permalink
Added krew to kubernetes flavour. Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mmontes11 committed Oct 25, 2024
1 parent 595e556 commit 532319f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,17 @@ jobs:
run: sudo bash k9s.sh -y

- name: Test k9s override
run: sudo K9S_VERSION=v0.32.4 bash k9s.sh -y
run: sudo K9S_VERSION=v0.32.4 bash k9s.sh -y

test-krew:
name: Test krew
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Test
run: sudo bash krew.sh -y

- name: Test krew override
run: sudo KREW_VERSION=v0.4.4 bash krew.sh -y
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ curl -sfL https://raw.githubusercontent.com/mmontes11/k8s-tooling/main/k9s.sh |

[k9s](https://github.com/derailed/k9s) is also installed by the [Kubernetes](#kubernetes) installation flavour.

### 🧩 krew

```bash
curl -sfL https://raw.githubusercontent.com/mmontes11/k8s-tooling/main/krew.sh | sudo bash -s -
```

After installing, please add the following line to your `.bashrc`/`.zshrc`:
```bash
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
```

[krew](https://krew.sigs.k8s.io/) is also installed by the [Kubernetes](#kubernetes) installation flavour.

### Override versions

```bash
Expand Down
5 changes: 4 additions & 1 deletion kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,7 @@ KUBESTR_URL=https://github.com/kastenhq/kubestr/releases/download/v${KUBESTR_VER
install_tar kubestr $KUBESTR_URL

# k9s
source <(curl -s https://raw.githubusercontent.com/mmontes11/k8s-scripts/main/k9s.sh) -y
source <(curl -s https://raw.githubusercontent.com/mmontes11/k8s-scripts/main/k9s.sh) -y

# krew
source <(curl -s https://raw.githubusercontent.com/mmontes11/k8s-scripts/main/krew.sh) -y

0 comments on commit 532319f

Please sign in to comment.