Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding kube-lock plugin #3409

Merged
merged 5 commits into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions plugins/lock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: lock
spec:
version: v0.0.4
homepage: https://github.com/chaosinthecrd/kube-lock
shortDescription: A client-side lock for kubernetes contexts to prevent kubectl misfires.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider shortening to 50 chars in a followup PR.

description: |
This tool allows you to `lock` and `unlock` contexts to prevent accidentally
issuing destructive commands to the wrong contexts. You can also set `profiles`,
which let you lock the context while keeping certain verb/resource combinations
available. It achieves by acting as a wrapper around `kubectl` and assessing
the command executed against a configuration file (at `~./kube-lock.yaml`).
caveats: must alias `kubectl` to kubectl-lock kubectl in `.bashrc`/`.zshrc` (e.g., alias kubectl='kubectl-lock kubectl --')
platforms:
- selector:
matchLabels:
os: darwin
arch: amd64
uri: https://github.com/chaosinthecrd/kube-lock/releases/download/v0.0.4/kube-lock_v0.0.4_darwin_amd64.tar.gz
sha256: d9e87d41876ea0bbbb33deac37589877c81f17e5dea820c605e6d636a6267e9e
bin: kubectl-lock
- selector:
matchLabels:
os: darwin
arch: arm64
uri: https://github.com/chaosinthecrd/kube-lock/releases/download/v0.0.4/kube-lock_v0.0.4_darwin_arm64.tar.gz
sha256: c6498479a52cbfcfb303ea06b9c12fd0e4d05aac2035f505c0db4e8fd54a9e23
bin: kubectl-lock
- selector:
matchLabels:
os: linux
arch: amd64
uri: https://github.com/chaosinthecrd/kube-lock/releases/download/v0.0.4/kube-lock_v0.0.4_linux_amd64.tar.gz
sha256: b8b7c140eff6c983d2d22127ea0617a333bdd88728782647b787e793e95bf346
bin: kubectl-lock
- selector:
matchLabels:
os: windows
arch: amd64
uri: https://github.com/chaosinthecrd/kube-lock/releases/download/v0.0.4/kube-lock_v0.0.4_windows_amd64.tar.gz
sha256: cac8d24f8fe430b59327b98ba0181e2dc0f3a9b6bb8433a29144314501220e20
bin: kubectl-lock.exe