@daocloud-proto/kairship 0.3.7 → 0.4.0
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.
- package/kairship.io/api/cluster/v1alpha1/cluster.pb.ts +18 -0
- package/kairship.io/api/instance/v1alpha1/instance.pb.ts +43 -0
- package/kairship.io/api/policy/v1alpha1/types.pb.ts +2 -0
- package/kairship.io/api/types/types.pb.ts +19 -0
- package/kairship.io/api/v1alpha1/kairship.pb.ts +15 -0
- package/package.json +1 -1
|
@@ -92,6 +92,24 @@ export type ListClustersRequest = {
|
|
|
92
92
|
region?: string
|
|
93
93
|
provider?: string
|
|
94
94
|
zone?: string
|
|
95
|
+
labelSelector?: string
|
|
96
|
+
fieldSelector?: string
|
|
97
|
+
clusterSelector?: string
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export type ListClustersLocationsSummaryRequest = {
|
|
101
|
+
instance?: string
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type ListClustersLocationsSummaryResponse = {
|
|
105
|
+
locations?: ClusterLocation[]
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export type ClusterLocation = {
|
|
109
|
+
cluster?: string
|
|
110
|
+
provider?: string
|
|
111
|
+
region?: string
|
|
112
|
+
zone?: string
|
|
95
113
|
}
|
|
96
114
|
|
|
97
115
|
export type ListClustersResponse = {
|
|
@@ -126,4 +126,47 @@ export type CreateInstanceKubeConfigRequest = {
|
|
|
126
126
|
export type CreateInstanceKubeConfigResponse = {
|
|
127
127
|
kubeConfigString?: string
|
|
128
128
|
instance?: string
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export type FailoverTimeout = {
|
|
132
|
+
failoverEvictionTimeout?: string
|
|
133
|
+
clusterMonitorPeriod?: string
|
|
134
|
+
clusterStartupGracePeriod?: string
|
|
135
|
+
clusterMonitorGracePeriod?: string
|
|
136
|
+
gracefulEvictionTimeout?: string
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export type UpdateInstanceFailoverRequest = {
|
|
140
|
+
instance?: string
|
|
141
|
+
enabled?: boolean
|
|
142
|
+
timeout?: FailoverTimeout
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export type GetInstanceFailoverRequest = {
|
|
146
|
+
instance?: string
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export type GetInstanceFailoverResponse = {
|
|
150
|
+
enabled?: boolean
|
|
151
|
+
timeout?: FailoverTimeout
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export type DeschedulerTimeout = {
|
|
155
|
+
deschedulingInterval?: string
|
|
156
|
+
unschedulableThreshold?: string
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export type UpdateInstanceDeschedulerRequest = {
|
|
160
|
+
instance?: string
|
|
161
|
+
enabled?: boolean
|
|
162
|
+
timeout?: DeschedulerTimeout
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export type GetInstanceDeschedulerRequest = {
|
|
166
|
+
instance?: string
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type GetInstanceDeschedulerResponse = {
|
|
170
|
+
enabled?: boolean
|
|
171
|
+
timeout?: DeschedulerTimeout
|
|
129
172
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as KairshipIoApiTypesObjectmeta from "../../types/objectmeta.pb"
|
|
8
|
+
import * as KairshipIoApiTypesTypes from "../../types/types.pb"
|
|
8
9
|
export type ResourceSelector = {
|
|
9
10
|
apiVersion?: string
|
|
10
11
|
kind?: string
|
|
@@ -17,4 +18,5 @@ export type ClusterAffinity = {
|
|
|
17
18
|
labelSelector?: KairshipIoApiTypesObjectmeta.LabelSelector
|
|
18
19
|
clusterNames?: string[]
|
|
19
20
|
exclude?: string[]
|
|
21
|
+
fieldSelector?: KairshipIoApiTypesTypes.ClusterFieldSelector
|
|
20
22
|
}
|
|
@@ -9,4 +9,23 @@ export enum ConditionStatus {
|
|
|
9
9
|
True = "True",
|
|
10
10
|
False = "False",
|
|
11
11
|
Unknown = "Unknown",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export enum ClusterSelectorOperator {
|
|
15
|
+
In = "In",
|
|
16
|
+
NotIn = "NotIn",
|
|
17
|
+
Exists = "Exists",
|
|
18
|
+
DoesNotExist = "DoesNotExist",
|
|
19
|
+
Gt = "Gt",
|
|
20
|
+
Lt = "Lt",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type ClusterFieldSelector = {
|
|
24
|
+
matchExpressions?: ClusterSelectorRequirement[]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type ClusterSelectorRequirement = {
|
|
28
|
+
key?: string
|
|
29
|
+
operator?: ClusterSelectorOperator
|
|
30
|
+
values?: string[]
|
|
12
31
|
}
|
|
@@ -69,6 +69,9 @@ export class Cluster {
|
|
|
69
69
|
static ListClusters(req: KairshipIoApiClusterV1alpha1Cluster.ListClustersRequest, initReq?: fm.InitReq): Promise<KairshipIoApiClusterV1alpha1Cluster.ListClustersResponse> {
|
|
70
70
|
return fm.fetchReq<KairshipIoApiClusterV1alpha1Cluster.ListClustersRequest, KairshipIoApiClusterV1alpha1Cluster.ListClustersResponse>(`/apis/kairship.io/v1alpha1/kpanda-clusters?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
71
71
|
}
|
|
72
|
+
static ListClustersLocationSummary(req: KairshipIoApiClusterV1alpha1Cluster.ListClustersLocationsSummaryRequest, initReq?: fm.InitReq): Promise<KairshipIoApiClusterV1alpha1Cluster.ListClustersLocationsSummaryResponse> {
|
|
73
|
+
return fm.fetchReq<KairshipIoApiClusterV1alpha1Cluster.ListClustersLocationsSummaryRequest, KairshipIoApiClusterV1alpha1Cluster.ListClustersLocationsSummaryResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/clusters-locations?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
74
|
+
}
|
|
72
75
|
static JoinCluster(req: KairshipIoApiClusterV1alpha1Cluster.ClusterRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
73
76
|
return fm.fetchReq<KairshipIoApiClusterV1alpha1Cluster.ClusterRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/clusters/${req["name"]}`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
74
77
|
}
|
|
@@ -267,6 +270,18 @@ export class Instance {
|
|
|
267
270
|
static CreateInstanceAdminKubeConfig(req: KairshipIoApiInstanceV1alpha1Instance.CreateInstanceKubeConfigRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInstanceV1alpha1Instance.CreateInstanceKubeConfigResponse> {
|
|
268
271
|
return fm.fetchReq<KairshipIoApiInstanceV1alpha1Instance.CreateInstanceKubeConfigRequest, KairshipIoApiInstanceV1alpha1Instance.CreateInstanceKubeConfigResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/kubeconfig`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
269
272
|
}
|
|
273
|
+
static GetInstanceFailover(req: KairshipIoApiInstanceV1alpha1Instance.GetInstanceFailoverRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInstanceV1alpha1Instance.GetInstanceFailoverResponse> {
|
|
274
|
+
return fm.fetchReq<KairshipIoApiInstanceV1alpha1Instance.GetInstanceFailoverRequest, KairshipIoApiInstanceV1alpha1Instance.GetInstanceFailoverResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/failover?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
275
|
+
}
|
|
276
|
+
static UpdateInstanceFailover(req: KairshipIoApiInstanceV1alpha1Instance.UpdateInstanceFailoverRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
277
|
+
return fm.fetchReq<KairshipIoApiInstanceV1alpha1Instance.UpdateInstanceFailoverRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/failover`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
278
|
+
}
|
|
279
|
+
static GetInstanceDescheduler(req: KairshipIoApiInstanceV1alpha1Instance.GetInstanceDeschedulerRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInstanceV1alpha1Instance.GetInstanceDeschedulerResponse> {
|
|
280
|
+
return fm.fetchReq<KairshipIoApiInstanceV1alpha1Instance.GetInstanceDeschedulerRequest, KairshipIoApiInstanceV1alpha1Instance.GetInstanceDeschedulerResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/descheduler?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
281
|
+
}
|
|
282
|
+
static UpdateInstanceDescheduler(req: KairshipIoApiInstanceV1alpha1Instance.UpdateInstanceDeschedulerRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
283
|
+
return fm.fetchReq<KairshipIoApiInstanceV1alpha1Instance.UpdateInstanceDeschedulerRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/descheduler`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
284
|
+
}
|
|
270
285
|
}
|
|
271
286
|
export class CloudShell {
|
|
272
287
|
static CreateCloudShell(req: KairshipIoApiCloudshellV1alpha1Cloudshell.CreateCloudShellRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCloudshellV1alpha1Cloudshell.CloudShell> {
|