Discover Packages
github.com/weapons97/helm-api
command
module
Version:
v0.0.0-...-887dc56
Opens a new window with list of versions in this module.
Published: Nov 21, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
helm-api
通过 grpc 和 http 接口部署 helm charts (仅支持3.0.0+)
为什么要使用helm-api
有时候您希望通过程序在集群上部署和管理helm release。
有时候您希望通过http接口在集群上部署和管理helm release。
实现接口
Key 关键词
Context
context 存储了k8s权限和helm repository。所以用户可以通过context 复用这些信息。
ContextName
如果用户请求中带有ContextName 请求会使用对应context 存储的k8s权限和helm repository。如果请求不带有contextName,请求会根据RepoInfo 和 KubeInfo创建一个临时的context。
Installation
git clone git@github.com :weapons97/helm-api.git
cd helm-api
kubectl install -f deploy
DOC
请看 doc/doc.md
HTTP
请看 swagger/helm-api.swagger.json
GRPC
请看 protos/helm-api.proto
Examples
cd ./examples 打开此目录,运行一下脚本以验证接口。
指定ip和端口
export host=<你的 helm-api host>
export port=<你的 helm-api port>
创建context。
# node createContext.js <your kubeconfig> <your context> <your namespace>
node createContext.js ~/kube.config "" "test"
创建 incluster context。 incluster context 使用service account 为操作授权。
Create an incluster context. Incluster context uses service account to authorize operations.
# node inclusterContext.js <your namespace>
node inclusterContext.js default
更新 repo
node repoupdate.js
获得 chart 信息
# node getchart.js test <repo name> <chart name>
node getchart.js test bitnami mariadb
创建一个mysql release
# node install.js <release name>
node install.js mysql
获取mysql release values
# node getreleasevalues.js <context name> <release name>
node getreleasevalues.js test mysql
更新mysql release
# node upgrade <release name>
node upgrade mysql
获取mysql release all
# node getreleasevalues.js <context name> <release name>
node getreleasevalues.js test mysql
获取 release history
# node history.js <context name> <release name>
node history.js test mysql
回滚 release
# node rollback.js <context name> <release name> <version>
node rollback.js test mysql 1
删除 release
# node deleterelease.js <context name> <release name>
node deleterelease.js test mysql
删除context
# node deleteContext.js <context name>
node deleteContext.js test
Expand ▾
Collapse ▴
Documentation
¶
Copyright © 2020 weapons97@gmail.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Source Files
¶
Directories
¶
pkg
protos
Package helmapi is a reverse proxy.
Package helmapi is a reverse proxy.
Click to show internal directories.
Click to hide internal directories.