kubectl icon indicating copy to clipboard operation
kubectl copied to clipboard

Consider provide kubectl-plugin-scaffolding repository as a public template for Go

Open Dentrax opened this issue 3 years ago • 8 comments

What would you like to be added:

The idea is inspired by terraform-provider-scaffolding project, which makes life easier to create custom providers from scratch. But Kubernetes, currently uses sample-cli-plugin to demonstrate how can we create custom plugins from scratch.

We (w/@developer-guy) are proposing to create brand-new batteries-included public template repository for the developer who do not want to do chore things and lost in how-to articles around there. ^1

Why is this needed:

To provide batteries-included project:

  • .gitignore
  • .goreleaser.yml
  • .golangci-lint.yml
  • docs/
  • .github/
    • dependabot
    • ISSUE + PR Templates
    • workflows: test + build
  • CONTRIBUTING.md
  • OWNERS
  • LICENSE
  • .krew.yaml
  • just or make file
    • build: go build (ldflags for version)
    • test: unit + integrations
    • fmt: format checking
    • lint: linters

Easy instructions to build new plugin from scratch:

  1. Click Use this template button
  2. Clone the forked repository and cd into it
  3. Build the plugin using the make command:

If you liked the idea we can drop a proposal in the kubernetes/enhancements repository. Any feedback would be appreciated!

Dentrax avatar Oct 28 '21 18:10 Dentrax

Hi @Dentrax!

We discussed this today during our bi-weekly meeting and don't think we need to add another repo but would love for y'all to upstream some of these suggestions to the current sample repo.

No KEP is needed but PRs must be made against the main kubernetes/kubernetes repo since the sample plugin is a "staging repo".

Please tag me on any PRs you make there.

https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/sample-cli-plugin

Thoughts?

eddiezane avatar Nov 03 '21 22:11 eddiezane

Hi @eddiezane!

Thanks for the suggestions and review. That makes sense to continue with current repo. I did not know the detail that we could change the current repos as the public templates, I thought we can only do that during the repo creation!

So, If you agreed the glossary that we wrote in the "Why is this needed" section, we (w/ @developer-guy @erkanzileli) can starting working on a PR!

Please note that this work might bring a tremendous amount of change and refactor across the entire repo. But at the end of the day, developers will be able to create their own kubectl plugins with one single click! :)

Dentrax avatar Nov 04 '21 21:11 Dentrax

Hey @eddiezane, any additional updates here? You can assign us if you're agreeing the proposal, so we can start working on W.I.P PR! 🤗

Dentrax avatar Nov 25 '21 15:11 Dentrax

Kindly ping. 🤞

Dentrax avatar Feb 03 '22 07:02 Dentrax

Apologies for the delay here.

If you're still interested in working on this please feel free to open smaller PRs against the existing repo. Especially when it comes CI/vendor implementations and we can discuss there.

/triage accepted /assign @Dentrax

eddiezane avatar Mar 30 '22 15:03 eddiezane

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jun 28 '22 15:06 k8s-triage-robot

/remove-lifecycle stale /remove-lifecycle rotten

Dentrax avatar Jun 28 '22 18:06 Dentrax

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Sep 26 '22 19:09 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Oct 26 '22 19:10 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Nov 25 '22 20:11 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Nov 25 '22 20:11 k8s-ci-robot