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

add krew manifest for snapshot-api-objects #4227

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 2 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
43 changes: 43 additions & 0 deletions plugins/snapshot_api_objects.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
# 'name' must match the filename of the manifest. The name defines how
Copy link
Member

Choose a reason for hiding this comment

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

Let's remove the boilerplate comments.

Copy link
Author

Choose a reason for hiding this comment

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

Removed with the new commit

name: snapshot_api_objects
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason you picked _ over - ? It's rather not typical plugin naming.

Copy link
Author

Choose a reason for hiding this comment

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

This was an oversight, I've updated it to snapshot-api-objects now

spec:
# 'version' is a valid semantic version string (see semver.org). Note the prefix 'v' is required.
version: "v0.0.5"
# 'homepage' usually links to the GitHub repository of the plugin
homepage: https://github.com/oguzhan-yilmaz/kubectl-snapshot-api-objects
# 'shortDescription' explains what the plugin does in only a few words
shortDescription: "Snapshot Kubernetes API Objects"
description: |
Snapshot all Kubernetes Objects and save them as yaml files in .tar.gz archive.
Copy link
Member

Choose a reason for hiding this comment

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

Does kubectl get-all plugin let us do this? If so, it might be good to not create another plugin and instead compose them.

caveats: |
Requires:
- kubectl neat
- yq

platforms:
- selector:
matchExpressions:
- key: "os"
operator: "In"
values:
- darwin
- linux
# 'uri' specifies .zip or .tar.gz archive URL of a plugin
uri: "https://github.com/oguzhan-yilmaz/kubectl-snapshot-api-objects/archive/v0.0.5.tar.gz" # https://github.com/achanda/kubectl-restart/archive/v0.0.3.zip
# 'sha256' is the sha256sum of the url (archive file) above
sha256: 39ee15d3852056ac870769c37cb83880546b2fbda1e58731b34d3d7b49bb2380

# 'files' lists which files should be extracted out from downloaded archive
files:
- from: "kubectl-snapshot-api-objects-*/snapshot_api_objects"
to: "."
- from: "kubectl-snapshot-api-objects-*/LICENSE"
to: "."

# 'bin' specifies the path to the the plugin executable among extracted files
bin: snapshot_api_objects

# chmod +x ~/.krew/store/snapshot_api_objects/v0.0.1/source/snapshot-api-objects-script.sh
Loading