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

chore: add krew-release-bot for publishing plugin releases #78

Merged
merged 3 commits into from
Jun 26, 2020
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update new version for plugin 'kubectl-who-can' in krew-index
uses: rajatjindal/krew-release-bot@v0.0.38
64 changes: 64 additions & 0 deletions .krew.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: who-can
spec:
version: "{{ .TagName }}"
homepage: https://github.com/aquasecurity/kubectl-who-can
shortDescription: >-
Shows who has RBAC permissions to access Kubernetes resources
description: |+2
Shows which subjects have RBAC permissions to VERB [TYPE | TYPE/NAME | NONRESOURCEURL]

VERB is a logical Kubernetes API verb like 'get', 'list', 'watch', 'delete', etc.
TYPE is a Kubernetes resource. Shortcuts and API groups will be resolved, e.g. 'po' or 'pod.metrics.k8s.io'.
NAME is the name of a particular Kubernetes resource.
NONRESOURCEURL is a partial URL that starts with "/".

For example, if you want to find all subjects who have permission to
delete pods in a particular namespace, or to delete nodes in the cluster
(dangerous!) you could run the following commands:

$ kubectl who-can delete pods --namespace foo
$ kubectl who-can delete nodes

For usage or examples, run:

$ kubectl who-can -h
caveats: |
The plugin requires the rights to list (Cluster)Role and (Cluster)RoleBindings.
platforms:
- selector:
matchLabels:
os: darwin
arch: amd64
{{addURIAndSha "https://github.com/aquasecurity/kubectl-who-can/releases/download/{{ .TagName }}/kubectl-who-can_darwin_x86_64.tar.gz" .TagName | indent 6}}
files:
- from: kubectl-who-can
to: .
- from: LICENSE
to: .
bin: kubectl-who-can
- selector:
matchLabels:
os: linux
arch: amd64
{{addURIAndSha "https://github.com/aquasecurity/kubectl-who-can/releases/download/{{ .TagName }}/kubectl-who-can_linux_x86_64.tar.gz" .TagName | indent 6}}
files:
- from: kubectl-who-can
to: .
- from: LICENSE
to: .
bin: kubectl-who-can
- selector:
matchLabels:
os: windows
arch: amd64
{{addURIAndSha "https://github.com/aquasecurity/kubectl-who-can/releases/download/{{ .TagName }}/kubectl-who-can_windows_x86_64.zip" .TagName | indent 6}}
files:
- from: kubectl-who-can.exe
to: .
- from: LICENSE
to: .
bin: kubectl-who-can.exe