Skip to content

Commit

Permalink
chore: Add krew-release-bot for publishing plugin releases (#78)
Browse files Browse the repository at this point in the history
Resolves: #57

Co-authored-by: Carol <[email protected]>
  • Loading branch information
krol3 and krol3 authored Jun 26, 2020
1 parent 36b4791 commit 5d0f3d1
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
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/[email protected]
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

0 comments on commit 5d0f3d1

Please sign in to comment.