command
module
Version:
v0.0.0-...-0137e5c
Opens a new window with list of versions in this module.
Published: May 10, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 39
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
USAGE
-
git clone
-
go build main.go
-
./main
Hypercloud-api-server API Specification
- Hypercloud-api-server에서 제공하는 API 목록
- Prefix : http://{HYPERCLOUD5-API-SERVER-SERVICE}:{PORT}
ALERT
Get
-
Description
생성 된 alert Get 하는 서비스.
필수 파라미터 = namespace
-
RequestURL
GET /alert
-
RequestHeader
x
-
QueryParam
name : {NAME}
labelSelector : {LABEL}
namespace : {NAMESPACE}
-
PathParam
x
-
RequestBody
x
-
ResponseBody
ex)
[
{
"kind": "AlertList",
"apiVersion": "tmax.io/v1",
"metadata":{
"selfLink": "/apis/tmax.io/v1/namespaces/default/alerts",
"resourceVersion": "249653521",
"creationTimestamp": null
},
"spec":{
"kind": "warning",
"name": "pod-1234",
"resource": "podCPU",
"message": "pod cpu usage 90%"
}
}
]
POST
-
Description
alert 리소스를 생성하는 service.
alertmanager가 직접 호출 한다.
-
RequestURL
POST /alert
-
RequestHeader
x
-
QueryParam
x
-
PathParam
x
-
RequestBody
ex)
[
{
"name" : "pod_name",
"alert" : "CPU_noti",
"namespace" : "default",
"message" : "cpu 20%"
}
]
-
ResponseBody
x
METERING
schema,secret은 mysql-create.yaml에서 관리
Get
-
Description
현재까지의 리소스 사용량을 조회하는 API
-
RequestURL
GET /metering
-
RequestHeader
x
-
QueryParam
offset : {OFFSET}
limit : {LIMIT}
namespace : {NAMESPACE}
timeUnit : {TIMEUNIT} (hour, day, month, year) (default=day)
startTime : {STARTTIME}
endTime : {ENDTIME}
sort : {SORTS}
-
PathParam
x
-
RequestBody
x
-
ResponseBody
ex)
[
{
"id": "56e1c905-530c-4ece-8a00-a9bed2477607",
"namespace": "hypercloud4-system",
"cpu": 0,
"memory": 1158947976,
"storage": 10737418240,
"gpu": 0,
"publicIp": 2,
"privateIp": 0,
"trafficIn": 0,
"trafficOut": 0,
"meteringTime": "2021-01-15T00:00:00Z"
},
...
]
NAMESPACE
Get
-
Description
접근 가능한 namespace list를 조회하는 API
-
RequestURL
GET /namespace
-
RequestHeader
x
-
QueryParam
userId : {USERID}
limit : {LIMIT}
labelSelector : {LABELSELECTOR}
userGroup : {USER_GROUP} ex) hypercloud4,tmaxcloud,...
-
PathParam
x
-
RequestBody
x
-
ResponseBody
x
PUT
trial namespace 기간 연장 API
-
RequestURL
PUT /namespace
-
RequestHeader
x
-
QueryParam
nsName : {NAMESPACE}
period : {ADDPERIOD}
-
PathParam
x
-
RequestBody
x
-
ResponseBody
x
NAMESPACECLAIM
Get
PUT
USER
POST
DELETE
VERSION
모듈의 version 정보에 관한 API
label정보는 1.initialization.yaml의 ConfigMap에서 관리
Get
-
Description
마운트 된 configmap을 이용하여
각 모듈의 version 정보를 얻어오는 API
-
RequestURL
GET /version
-
RequestHeader
x
-
QueryParam
x
-
PathParam
x
-
RequestBody
x
-
ResponseBody
eg)
[
{
"name": "HyperCloud-Operator",
"status": "Normal",
"version": "b4.1.3"
},
{
"name": "HyperCloud-Console",
"status": "Normal",
"version": "4.1.4"
},
...
]
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.