Skip to content

Commit

Permalink
Merge pull request #95 from iawia002/docs
Browse files Browse the repository at this point in the history
docs: add integration with KubeSphere Cloud section
  • Loading branch information
iawia002 committed Jun 12, 2024
2 parents 68317c4 + 52a0b03 commit 9dba06d
Showing 1 changed file with 65 additions and 2 deletions.
67 changes: 65 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,75 @@ status:
link: /dist/<extension-name>-frontend/index.js
```

Please refer to [KubeSphere extension development guide](https://dev-guide.kubesphere.io/extension-dev-guide/zh/development-procedure/) for more details on extension development.

## Publish/Unpublish your KubeSphere extension

You can publish/unpublish KubeSphere extension to KubeSphere cluster once it's ready:

```shell
ksbuilder publish/unpublish <extension-name>
```

## Push and submit your extension to KubeSphere Cloud

### Create API access token

1. Register an account on [KubeSphere Cloud](https://kubesphere.cloud).
2. Open [KubeSphere Marketplace](https://kubesphere.co/marketplace/), click on "Become a service provider," sign the agreement, and become an extension service provider (i.e., developer).
3. Open [https://kubesphere.cloud/user/setting/](https://kubesphere.cloud/user/setting/), click on "Security," then click "Create Token," check "Extension Component," and click "Generate." The generated token is the cloud API key, formatted like `kck-xxx`. Please keep it safe.

### Login to KubeSphere Cloud

Use the `ksbuilder login` subcommand to login to KubeSphere Cloud:

```
$ ksbuilder login
✔ Enter API token: ***
Login Succeeded
```

or:

```
$ ksbuilder login -t xxx
Login Succeeded
```

### Push and submit the extension

Use the `ksbuilder push` subcommand to submit the plugin to KubeSphere Cloud. The `push` subcommand is similar to `publish` and the target can be either a directory or a packaged `.tgz` file:

```
$ ksbuilder push tower
$ ksbuilder push tower-1.0.0.tgz
```

> NOTE: We will upload static files such as icons and screenshots in the extension to the KubeSphere Cloud separately
and delete the static file directory in the original package to reduce the size of the entire chart.

### Check the extension status

After submitting the extension, it needs to be approved by an administrator before it can be listed on KubeSphere Marketplace. You can use the `ksbuilder get` or `ksbuilder list` subcommands to check the status of the extension:

```
$ ksbuilder list
ID NAME STATUS LATEST VERSION
469804312491467933 devops ready 1.0.0
482307830796264605 kubeblocks ready 0.6.3
```

```
$ ksbuilder get tower
Name: tower
ID: 515518094316151974
Status: draft
SNAPSHOT ID VERSION STATUS UPDATE TIME
515518094316217510 1.0.0 submitted 2024-05-27 09:37:05
```

Please refer to [KubeSphere extension development guide](https://dev-guide.kubesphere.io/extension-dev-guide/en/packaging-and-release/) for more details on extension packaging and releasing.

0 comments on commit 9dba06d

Please sign in to comment.