kubernetes-sigs / krew-index

Plugin index for https://github.com/kubernetes-sigs/krew. This repo is for plugin maintainers.
https://krew.sigs.k8s.io
Apache License 2.0
638 stars 494 forks source link

add krew manifest for snapshot-api-objects #4227

Open oguzhan-yilmaz opened 2 weeks ago

oguzhan-yilmaz commented 2 weeks ago

About

This plugins loops through namespaces, kubernetes api object types and gets the -o yaml output, pipes it to kubectl neat - create a snapshot of the currently installed K8s API objects to filesystem.

Then it creates a .tar.gz file with cluster name and timestamp values.

Verify you can install your plugin locally: kubectl krew install --manifest=[...] --archive=[...]

$ kubectl krew install --manifest=plugins/snapshot_api_objects.yaml
Installing plugin: snapshot_api_objects
Installed plugin: snapshot_api_objects
\
 | Use this plugin:
 |      kubectl snapshot_api_objects
 | Documentation:
 |      https://github.com/oguzhan-yilmaz/kubectl-snapshot-api-objects
 | Caveats:
 | \
 |  | Requires:
 |  |   - kubectl neat
 |  |   - yq
 | /
/
linux-foundation-easycla[bot] commented 2 weeks ago

CLA Signed

The committers listed above are authorized under a signed CLA.

ahmetb commented 2 weeks ago

:robot: Beep beep! I’m a robot speaking on behalf of @ahmetb. :robot:


Thanks for submitting your kubectl plugin to Krew! One of the krew-index maintainers will review it soon. Note that the reviews for new plugin submissions may take a few days.

In the meanwhile, here are a few tips to make your plugin manifest better:

Thanks for your patience! /kind new-plugin

k8s-ci-robot commented 2 weeks ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: oguzhan-yilmaz Once this PR has been reviewed and has the lgtm label, please assign chriskim06 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/kubernetes-sigs/krew-index/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
k8s-ci-robot commented 2 weeks ago

Welcome @oguzhan-yilmaz!

It looks like this is your first PR to kubernetes-sigs/krew-index 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/krew-index has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

oguzhan-yilmaz commented 2 weeks ago

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

Thanks for the insight @ahmetb. I wasn't aware of the get-all plugin and it does a good job at data collection with more CLI options.

My main goal was to have a way to snapshot API Objects to a point-in-time and then have another way to diff the snapshots to get an idea of what's changed.

So I created this plugin to have the data, and was planning to create a complementary plugin for diffing two snapshots using the dyff tool. Which is a great tool with semantic diff features.

I've decided to collect the two features into this plugin to make it different than get-all plugin.

My current plan is:

Would adding the diff functionality make this plugin acceptable?