A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Eileen-Yu/kb-js-plugin below:

Eileen-Yu/kb-js-plugin: A sample external plugin for kubebuilder in JavaScript.

An External Plugin for Kubebuilder

A sample external plugin written in Javascript.

  1. Build the js plugin into an executable
# Install Dependencies
npm ci

# Build an executable into dist/kb-js-plugin/v1/kb-js-plugin
npm run build
  1. Load the plugin and run kb command
# 1. Display help info for `init` / `create api` / `create webhook` / `edit` subcommand
EXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \
  kubebuilder init --plugins=kb-js-plugin/v1 --help

EXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \
  kubebuilder create api --plugins=kb-js-plugin/v1 --help

EXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \
  kubebuilder create webhook --plugins=kb-js-plugin/v1 --help

EXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \
  kubebuilder edit --plugins=kb-js-plugin/v1 --help


# 2. scaffold the project by `init` subcommand with valid flag `--domain`
EXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \
  kubebuilder init --plugins=kb-js-plugin/v1 --domain eileen.io


# 3. create an api for the project by `create api` subcommand with GVK
EXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \
  kubebuilder create api --plugins=kb-js-plugin/v1 --group webapp --version v1 --kind Guestbook


# 4. create a webhook for the project by `create webhook` subcommand with GVK
EXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \
  kubebuilder create webhook --plugins=kb-js-plugin/v1 --group webapp --version v1 --kind Guestbook

# 5. update the api for the project by `edit` subcommand
EXTERNAL_PLUGINS_PATH=/Users/eileen/programming/kb-js-plugin/dist/ \
  kubebuilder edit --plugins=kb-js-plugin/v1
  1. Check the output

The plugin triggered by init will generate the PROJECT file, and another file initFile with the domain you specified.

The plugin triggered by create api will generate a file apiFile with the GVK you specified.

The plugin triggered by create webhook will generate a file webhookFile with the GVK you specified.

The plugin triggered by edit will update the apiFile.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4