Giter VIP home page Giter VIP logo

ksbuilder's Introduction

Introduction

ksbuilder is a CLI tool to initialize, create, and publish KubeSphere extensions.

Install

Download the latest ksbuilder release and then install it to /usr/local/bin:

tar xvzf ksbuilder_<version>_<arch>.tar.gz -C /usr/local/bin/

Initialize a KubeSphere extension project

You can initialize a KubeSphere extension project as below:

// init a project
ksbuilder init <project-directory>

Create your first KubeSphere extension

You can use ksbuilder create to create a KubeSphere extension interactively.

cd <project-directory>
ksbuilder create <extension-name>

The extension directory created looks like below:

.
├── Chart.yaml
├── charts
│     ├── backend
│     │     ├── Chart.yaml
│     │     ├── templates
│     │     │     ├── NOTES.txt
│     │     │     ├── deployment.yaml
│     │     │     ├── extensions.yaml
│     │     │     ├── helps.tpl
│     │     │     ├── service.yaml
│     │     │     └── tests
│     │     │         └── test-connection.yaml
│     │     └── values.yaml
│     └── frontend
│         ├── Chart.yaml
│         ├── templates
│         │     ├── NOTES.txt
│         │     ├── deployment.yaml
│         │     ├── extensions.yaml
│         │     ├── helps.tpl
│         │     ├── service.yaml
│         │     └── tests
│         │         └── test-connection.yaml
│         └── values.yaml
└── values.yaml

Then you can customize your extension like below:

  • Specify the default backend and frontend images
frontend:
  enabled: true
  image:
repository:  <YOUR_REPO>/<extension-name>
    tag: latest

backend:
  enabled: true
  image:
    repository: <YOUR_REPO>/<extension-name>
    tag: latest
  • Add APIService definition to the backend extensions.yaml
apiVersion: extensions.kubesphere.io/v1alpha1
kind: APIService
metadata:
  name: v1alpha1.<extension-name>.kubesphere.io
spec:
  group: <extension-name>.kubesphere.io
  version: v1alpha1                                      
  url: http://<extension-name>-backend.default.svc:8080
status:
  state: Available
  • Add JSBundle definition to the frontend extensions.yaml
apiVersion: extensions.kubesphere.io/v1alpha1
kind: JSBundle
metadata:
  name: v1alpha1.<extension-name>.kubesphere.io
spec:
  rawFrom:
    url: http://<extension-name>-frontend.default.svc/dist/<extension-name>-frontend/index.js
status:
  state: Available
  link: /dist/<extension-name>-frontend/index.js

Please refer to KubeSphere extension development guide for more details on extension development.

Install or upgrade your KubeSphere extension

You can use the following command to install a KubeSphere extension.

ksbuilder install <extension-name>

You can use the following command to upgrade a KubeSphere extension.

ksbuilder update <extension-name>

Publish your KubeSphere extension

You can publish KubeSphere extension to KubeSphere Cloud once it's ready:

ksbuilder publish <extension-name>

ksbuilder's People

Contributors

zheng1 avatar chenz24 avatar wtw1994 avatar wansir avatar iawia002 avatar rayzhou2017 avatar benjaminhuo avatar linuxsuren avatar isyes avatar yudong2015 avatar junotx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.