Helm Swift 的restful api使用方式

API参考

查看Tiller版本

GET http://127.0.0.1:9855/tiller/v2/version/json

汇总发布

# List releases with status `DEPLOYED` from all namespaces
GET http://127.0.0.1:9855/tiller/v2/releases/json

# List releases with status `DEPLOYED` from `default` namespace
GET http://127.0.0.1:9855/tiller/v2/releases/json?namespace=default

# List releases from all namespaces for a list of statuses
GET http://127.0.0.1:9855/tiller/v2/releases/json?status_codes=DEPLOYED&&status_codes=DELETED

# List releases from `default` namespace for a list of statuses
GET http://127.0.0.1:9855/tiller/v2/releases/json?namespace=default&status_codes=DEPLOYED&&status_codes=DELETED

# List releases with any status from all namespaces
GET http://127.0.0.1:9855/tiller/v2/releases/json?all=true

Available query parameters:
  namespace=<name of namespace>|EMPTY(for all namespaces)
  sort_by=NAME|LAST_RELEASED
  all=true|false
  sort_order=ASC|DESC
  status_codes=UNKNOWN, DEPLOYED, DELETED, SUPERSEDED, FAILED, DELETING

发行状态

GET http://127.0.0.1:9855/tiller/v2/releases/my-release/status/json

发布内容

GET http://127.0.0.1:9855/tiller/v2/releases/my-release/content/json
GET http://127.0.0.1:9855/tiller/v2/releases/my-release/content/json?format_values_as_json=true

发行历史

GET http://127.0.0.1:9855/tiller/v2/releases/my-release/json?max=10

回滚发布

GET http://127.0.0.1:9855/tiller/v2/releases/my-release/rollback/json

从URL安装发行版


# Install chart in default namespace
POST http://127.0.0.1:9855/tiller/v2/releases/my-release/json

{
	"chart_url": "https://github.com/tamalsaha/test-chart/raw/master/test-chart-0.1.0.tgz",
	"values": {
		"raw": "{\"ns\":\"c10\",\"clusterName\":\"h505\"}"
	}
}

# Install chart in custom "kube-system" namespace
POST http://127.0.0.1:9855/tiller/v2/releases/my-release/json

{
	"chart_url": "https://github.com/tamalsaha/test-chart/raw/master/test-chart-0.1.0.tgz",
	"namespace": "kube-system",
	"values": {
		"raw": "{\"ns\":\"c10\",\"clusterName\":\"h505\"}"
	}
}

# Install chart in custom "kube-system" namespace with custom values.yaml

## values.yaml
proxy:
  secretToken: mytoken
rbac:
   enabled: false

## convert values.yaml to json format and pass as string in "values.raw"
{
  "proxy": {
    "secretToken": "mytoken"
  },
  "rbac": {
    "enabled": false
  }
}

POST http://127.0.0.1:9855/tiller/v2/releases/my-release/json

{
	"chart_url": "https://github.com/tamalsaha/test-chart/raw/master/test-chart-0.1.0.tgz",
	"namespace": "kube-system",
	"values": {
		"raw": "{ \"proxy\": { \"secretToken\": \"mytoken\" }, \"rbac\": { \"enabled\": false } }"
	}
}

从稳定的kubeapps安装发行版(最新版本)

POST http://127.0.0.1:9855/tiller/v2/releases/my-release/json

{
“chart_url”: “stable/fluent-bit”
}

从稳定的kubeapps安装发行版(特定版本)

POST http://127.0.0.1:9855/tiller/v2/releases/my-release/json

{
“chart_url”: “stable/fluent-bit/0.1.2”
}

更新发布

PUT http://127.0.0.1:9855/tiller/v2/releases/my-release/json

{
“chart_url”: “https://github.com/tamalsaha/test-chart/raw/master/test-chart-0.1.0.tgz”,
“values”: {
“raw”: “{“ns”:“c15”,“clusterName”:“h505”}”
}
}

卸载版本

DELETE http://127.0.0.1:9855/tiller/v2/releases/my-release/json

卸载并清除发行版

DELETE http://127.0.0.1:9855/tiller/v2/releases/my-release/json?purge=true

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值