Skip to content

Commit

Permalink
Update README; add MDL
Browse files Browse the repository at this point in the history
Signed-off-by: Phil Dibowitz <[email protected]>
  • Loading branch information
jaymzh committed Mar 5, 2024
1 parent ce03c9a commit d13f3a3
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 8 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ jobs:
with:
version: latest
args: --timeout=5m
markdownlint:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: MarkdownLint mdl Action
uses: actionshub/[email protected]
38 changes: 30 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

## Intro

kubectl-daemons is a kubectl plugin to help with daemonset work. When running
a kubernetes infrastructure, it is common to do lots of work with deamonsets,
but the tools are optimized for other types of k8s objects. With daemonsets,
you often know a node and a DS you care about, and this plugin lets you focus
on that.
kubectl-daemons is a kubectl plugin to help with daemonset work. When running a
kubernetes infrastructure, it is common to do lots of work with deamonsets, but
the tools are optimized for other types of k8s objects. With daemonsets, you
often know a node and a DS you care about, and this plugin lets you focus on
that.

Previously you'd do things like:

Expand Down Expand Up @@ -92,15 +92,21 @@ goreleaser release

## Thanks

A huge thanks to Benjamin Muschko's [Writing your first kubectl plugin](https://bmuschko.com/blog/writing-your-first-kubectl-plugin/) blog post and associated [GH repo](https://github.com/bmuschko/kubectl-server-version). This was invaluable in getting me up and running.
A huge thanks to Benjamin Muschko's [Writing your first kubectl
plugin](https://bmuschko.com/blog/writing-your-first-kubectl-plugin/) blog post
and associated [GH repo](https://github.com/bmuschko/kubectl-server-version).
This was invaluable in getting me up and running.

## FAQ

**Why not just write a simple shell wrapper?**

For many reasons. First, I had that, and it's quite slow. You end up doing more queries than you need, and if your API servers are on the other side of privatelinks, it can get quite slow.
For many reasons. First, I had that, and it's quite slow. You end up doing more
queries than you need, and if your API servers are on the other side of
privatelinks, it can get quite slow.

Second, I wanted a good excuse to learn some golang and get better at Kube internals.
Second, I wanted a good excuse to learn some golang and get better at Kube
internals.

**Aren't there already other plugins that do this?**

Expand All @@ -109,3 +115,19 @@ Not that I could find!
**Can I contribute?**

Sure, send a pull request!

**Why did you end up re-implementing so much kubectl formatting code?**

Trust me, I didn't want to. Unfortunately kubectl plugins aren't really
"plugins". They're standalone binaries that `kubectl` executes for you. So you
can use whatever is in the k8s libraries, but various things kubectl does like
formatting `describe` output, or various calculated fields, are note exposed as
functions other code can call.

Ideally, plugins would be a library that could hook into various stages within
kubectl and allow you to not have to implement so much yourself, but it turns
out that's not how kubectl plugins work.

**Will you be submitting this to Krew?**

Yes! That'll happen very soon.

0 comments on commit d13f3a3

Please sign in to comment.