@daocloud-proto/kairship 0.0.7-26 → 0.0.7-32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,6 +43,12 @@ export type ClusterStatus = {
|
|
|
43
43
|
cpuUsage?: number
|
|
44
44
|
memoryUsage?: number
|
|
45
45
|
mode?: string
|
|
46
|
+
resourceSummary?: ClusterResourceSummary
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type ClusterResourceSummary = {
|
|
50
|
+
allocatable?: {[key: string]: string}
|
|
51
|
+
allocated?: {[key: string]: string}
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
export type ClusterSpec = {
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as KairshipIoApiTypesObjectmeta from "../../types/objectmeta.pb"
|
|
8
|
+
import * as KairshipIoApiTypesPage from "../../types/page.pb"
|
|
9
|
+
|
|
10
|
+
export enum ServiceType {
|
|
11
|
+
SERVICE_TYPE_UNSPECIFIED = "SERVICE_TYPE_UNSPECIFIED",
|
|
12
|
+
ClusterIP = "ClusterIP",
|
|
13
|
+
NodePort = "NodePort",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type Instance = {
|
|
17
|
+
metadata?: KairshipIoApiTypesObjectmeta.ObjectMeta
|
|
18
|
+
spec?: InstanceSpec
|
|
19
|
+
status?: InstanceStatus
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type InstanceSpec = {
|
|
23
|
+
images?: Images
|
|
24
|
+
namespace?: string
|
|
25
|
+
serviceType?: ServiceType
|
|
26
|
+
secretRef?: SecretRef
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type SecretRef = {
|
|
30
|
+
name?: string
|
|
31
|
+
namespace?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type Images = {
|
|
35
|
+
karmadaRegistry?: string
|
|
36
|
+
karmadaVersion?: string
|
|
37
|
+
kubeResgistry?: string
|
|
38
|
+
kubeVersion?: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type InstanceStatus = {
|
|
42
|
+
phase?: string
|
|
43
|
+
controlPlaneReady?: boolean
|
|
44
|
+
karmadaVersion?: string
|
|
45
|
+
kubernetesVersion?: string
|
|
46
|
+
summary?: InstanceStatusSummary
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type InstanceStatusSummary = {
|
|
50
|
+
resourceTotalNum?: {[key: string]: number}
|
|
51
|
+
policyTotalNum?: {[key: string]: number}
|
|
52
|
+
clusterSummary?: NumStatistic
|
|
53
|
+
nodeSummary?: NumStatistic
|
|
54
|
+
workLoadSummary?: {[key: string]: NumStatistic}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type NumStatistic = {
|
|
58
|
+
totalNum?: number
|
|
59
|
+
readyNum?: number
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type CreateInstanceRequest = {
|
|
63
|
+
cluster?: string
|
|
64
|
+
data?: Instance
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type GetOrDeleteInstanceRequest = {
|
|
68
|
+
name?: string
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type ListInstanceRequest = {
|
|
72
|
+
name?: string
|
|
73
|
+
page?: number
|
|
74
|
+
pageSize?: number
|
|
75
|
+
sortBy?: KairshipIoApiTypesPage.SortDir
|
|
76
|
+
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type ListInstanceResponse = {
|
|
80
|
+
items?: Instance[]
|
|
81
|
+
pagination?: KairshipIoApiTypesPage.Pagination
|
|
82
|
+
}
|
|
@@ -9,7 +9,7 @@ import * as GoogleProtobufEmpty from "../../../google/api/empty.pb"
|
|
|
9
9
|
import * as KairshipIoApiAppsV1alpha1Deployment from "../apps/v1alpha1/deployment.pb"
|
|
10
10
|
import * as KairshipIoApiClusterV1alpha1Cluster from "../cluster/v1alpha1/cluster.pb"
|
|
11
11
|
import * as KairshipIoApiCoreV1alpha1Service from "../core/v1alpha1/service.pb"
|
|
12
|
-
import * as
|
|
12
|
+
import * as KairshipIoApiInstanceV1alpha1Instance from "../instance/v1alpha1/instance.pb"
|
|
13
13
|
import * as KairshipIoApiPolicyV1alpha1Overridepolicy from "../policy/v1alpha1/overridepolicy.pb"
|
|
14
14
|
import * as KairshipIoApiPolicyV1alpha1Pp from "../policy/v1alpha1/pp.pb"
|
|
15
15
|
export class Policy {
|
|
@@ -110,14 +110,17 @@ export class Core {
|
|
|
110
110
|
return fm.fetchReq<KairshipIoApiCoreV1alpha1Service.DeleteServiceRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/services/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
export class
|
|
114
|
-
static
|
|
115
|
-
return fm.fetchReq<
|
|
113
|
+
export class Instance {
|
|
114
|
+
static CreateInstance(req: KairshipIoApiInstanceV1alpha1Instance.CreateInstanceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInstanceV1alpha1Instance.Instance> {
|
|
115
|
+
return fm.fetchReq<KairshipIoApiInstanceV1alpha1Instance.CreateInstanceRequest, KairshipIoApiInstanceV1alpha1Instance.Instance>(`/apis/kairship.io/v1alpha1/instances`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
116
116
|
}
|
|
117
|
-
static
|
|
118
|
-
return fm.fetchReq<
|
|
117
|
+
static GetInstance(req: KairshipIoApiInstanceV1alpha1Instance.GetOrDeleteInstanceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInstanceV1alpha1Instance.Instance> {
|
|
118
|
+
return fm.fetchReq<KairshipIoApiInstanceV1alpha1Instance.GetOrDeleteInstanceRequest, KairshipIoApiInstanceV1alpha1Instance.Instance>(`/apis/kairship.io/v1alpha1/instances/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
|
|
119
119
|
}
|
|
120
|
-
static
|
|
121
|
-
return fm.fetchReq<
|
|
120
|
+
static DeleteInstance(req: KairshipIoApiInstanceV1alpha1Instance.GetOrDeleteInstanceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
121
|
+
return fm.fetchReq<KairshipIoApiInstanceV1alpha1Instance.GetOrDeleteInstanceRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/instances/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
122
|
+
}
|
|
123
|
+
static ListInstances(req: KairshipIoApiInstanceV1alpha1Instance.ListInstanceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInstanceV1alpha1Instance.ListInstanceResponse> {
|
|
124
|
+
return fm.fetchReq<KairshipIoApiInstanceV1alpha1Instance.ListInstanceRequest, KairshipIoApiInstanceV1alpha1Instance.ListInstanceResponse>(`/apis/kairship.io/v1alpha1/instances?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
122
125
|
}
|
|
123
126
|
}
|
package/package.json
CHANGED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
/*
|
|
4
|
-
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import * as KairshipIoApiTypesObjectmeta from "../../types/objectmeta.pb"
|
|
8
|
-
export type KarmadaDeployment = {
|
|
9
|
-
metadata?: KairshipIoApiTypesObjectmeta.ObjectMeta
|
|
10
|
-
spec?: KarmadaDeploymentSpec
|
|
11
|
-
status?: KarmadaDeploymentStatus
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type KarmadaDeploymentSpec = {
|
|
15
|
-
mode?: string
|
|
16
|
-
images?: Images
|
|
17
|
-
secretRef?: SecretRef
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type SecretRef = {
|
|
21
|
-
name?: string
|
|
22
|
-
namespace?: string
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export type Images = {
|
|
26
|
-
karmadaRegistry?: string
|
|
27
|
-
karmadaVersion?: string
|
|
28
|
-
kubeResgistry?: string
|
|
29
|
-
kubeVersion?: string
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export type KarmadaDeploymentStatus = {
|
|
33
|
-
phase?: string
|
|
34
|
-
controlPlaneReady?: boolean
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export type CreateKarmadaDeploymentRequest = {
|
|
38
|
-
cluster?: string
|
|
39
|
-
data?: KarmadaDeployment
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export type GetOrDeleteKarmadaDeploymentRequest = {
|
|
43
|
-
name?: string
|
|
44
|
-
}
|