All Projects → replicatedhq → Krew Plugin Template

replicatedhq / Krew Plugin Template

Licence: apache-2.0
GitHub Repository Template for creating new Kubectl plugins

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Krew Plugin Template

Modern Html Starter Template
Modern HTML Starter Template
Stars: ✭ 752 (+2685.19%)
Mutual labels:  template
Donut
Xcode file template manager
Stars: ✭ 17 (-37.04%)
Mutual labels:  template
Zabbix Template Juniper Mx Bgp4 Ipv4 Ipv6
Zabbix Template for Juniper MX discovery BGP4 peers ipv4 and ipv6, RE, interfaces
Stars: ✭ 22 (-18.52%)
Mutual labels:  template
Laravel template with vue
laravel5.5和vue.js结合的前后端分离项目模板,后端使用了laravel的LTS版本(5.5),前端使用了流行的vue-element-template项目。作为程序的起点,可以直接以此为基础来进行业务扩展。模板内容包括基础的用户管理和权限管理、日志管理、集成第三方登录,整合laravel-echo-server 实现了websocket 做到了消息的实时推送,并在此基础上,实现了聊天室和客服功能。权限管理包括后端Token认证和前端vue.js的动态权限,解决了前后端完整分离的情况下,vue.js的认证与权限相关的痛点,已在本人的多个项目中集成使用。
Stars: ✭ 763 (+2725.93%)
Mutual labels:  template
Template Sailsjs Vue
Two independent projects (BackEnd and FrontEnd) working as one. A Sails application.
Stars: ✭ 16 (-40.74%)
Mutual labels:  template
Cookiecutter
DEPRECIATED! Please use nf-core/tools instead
Stars: ✭ 18 (-33.33%)
Mutual labels:  template
Bootstrap 5 Templates
A collection of free Bootstrap 5 templates designed with Material Design 2.0. Admin dashboard, e-commerce, landing pages & much more.
Stars: ✭ 722 (+2574.07%)
Mutual labels:  template
Puppy
Starter kit and delivery system for building static prototypes with Twig
Stars: ✭ 25 (-7.41%)
Mutual labels:  template
Azure Pipelines Template
template for your azure pipelines
Stars: ✭ 17 (-37.04%)
Mutual labels:  template
Mrm
Codemods for your project config files
Stars: ✭ 900 (+3233.33%)
Mutual labels:  template
Primitive
⛏️ ‎ A front-end design toolkit for developing web apps.
Stars: ✭ 783 (+2800%)
Mutual labels:  template
Ansible Skeleton
The skeleton to create new ansible roles.
Stars: ✭ 5 (-81.48%)
Mutual labels:  template
New Php Project
Template for new PHP projects. Also see https://github.com/JeroenDeDauw/new-php-library
Stars: ✭ 18 (-33.33%)
Mutual labels:  template
Datacurator Filetree
a standard filetree for /r/datacurator [ and r/datahoarder ]
Stars: ✭ 753 (+2688.89%)
Mutual labels:  template
Top Down Action Rpg Template
Top down action rpg template for Godot Engine
Stars: ✭ 23 (-14.81%)
Mutual labels:  template
Jslib Base
A modern JavaScript|Typescript library scaffolding, modularity, purity & extras
Stars: ✭ 721 (+2570.37%)
Mutual labels:  template
Azure Openshift
RedHat Openshift Origin cluster on Azure
Stars: ✭ 17 (-37.04%)
Mutual labels:  template
C cpp project framework
CMake build system( framework) with kconfig support for C/CPP projects
Stars: ✭ 26 (-3.7%)
Mutual labels:  template
Music Player
Android xml template layout for media/music player.
Stars: ✭ 24 (-11.11%)
Mutual labels:  template
Kube Render
Stars: ✭ 18 (-33.33%)
Mutual labels:  template

kubectl krew template repo

There's a lot of scaffolding needed to set up a good kubectl plugin. This repo is a GitHub Template Repo to make it easy to set all of this scaffolding up for a new repo.

The assumptions made are:

  1. You'll write your plugin in go
  2. You want client-go to interact with the cluster
  3. You want all of the kubectl flags available to your plugin
  4. Your plugin's home will be a github.com repo
  5. Your plugin will work in Linux, MacOS and Windows

Create your repo

Start here to create a new repo based on this template. This is not a fork, it will make a copy of this repo into your own organization or GitHub account.

Click that, and create your own version of this repo. Clone it locally. The rest of the steps you will be performing on your local copy.

Make it yours

Once you have your own repo created locally, change to the directory and run:

make setup

This will prompt you for a few things, such as your GitHub org, repo name and plugin name. The setup application will then update the import paths and code with the data you provided.

(Note, once you've run this step, these instructions will no longer be present in your repo. You can always vew then at https://github.com/replicatedhq/krew-plugin-template).

Commit and check it in to your repo!

git add .
git commit -m "Updating from template"
git push -u origin master

Write your Plugin

Next, open the pkg/plugin/plugin.go file. This is where you can start writing your plugin.

For an example, take a look at the outdated plugin that inspired this template.

To make a local build:

make bin

Creating a release

To create a new release of your plugin, create and push a tag.

git tag v0.1.0 -m 'initial release'
git push --tags

This repo has a built-in GitHub Action that will handle the build process. We use GoReleaser to create tagged releases. This will create all three binaries and push them to the releases page when you push a tag. It will take a few minutes to complete, so be patient.

Submitting to Krew

Be sure to read the guidelines on the Krew Developer guide before submitting you plugin. This is not automated (yet). We've created a starting point for your plugin manifest, look for it in deploy/krew/plugin.yaml.

Share!

Finally, we'd love to hear if you've used this template. Let us know on Twitter at @replicatedhq. We've written a few kubectl plugins too, and are always curious to see what other people are working on.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].