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

你可能感兴趣的:(Kubernetes,kubernetes,swift)