@daocloud-proto/kairship 0.2.2 → 0.2.3-2
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/aggregation/v1alpha1/aggregation.pb.ts +1 -0
- package/kairship.io/api/apps/v1alpha1/deployment.pb.ts +27 -4
- package/kairship.io/api/cluster/v1alpha1/cluster.pb.ts +14 -1
- package/kairship.io/api/core/v1alpha1/configmap.pb.ts +1 -1
- package/kairship.io/api/core/v1alpha1/namespace.pb.ts +16 -1
- package/kairship.io/api/core/v1alpha1/persistentvolumeclaim.pb.ts +5 -2
- package/kairship.io/api/core/v1alpha1/pod.pb.ts +1 -1
- package/kairship.io/api/core/v1alpha1/secret.pb.ts +2 -2
- package/kairship.io/api/insight/v1alpha1/prometheus.pb.ts +17 -0
- package/kairship.io/api/policy/v1alpha1/overridepolicy.pb.ts +2 -2
- package/kairship.io/api/policy/v1alpha1/popagrationpolicy.pb.ts +10 -10
- package/kairship.io/api/policy/v1alpha1/types.pb.ts +1 -0
- package/kairship.io/api/v1alpha1/kairship.pb.ts +20 -2
- package/package.json +1 -1
|
@@ -92,17 +92,40 @@ export type RestartDeploymentResponse = {
|
|
|
92
92
|
deployment?: Deployment
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
export type PromoteMemberClusterDeploymentRequest = {
|
|
96
|
+
instance?: string
|
|
97
|
+
cluster?: string
|
|
98
|
+
namespace?: string
|
|
99
|
+
name?: string
|
|
100
|
+
}
|
|
101
|
+
|
|
95
102
|
export type ListDeploymentsRequest = {
|
|
96
103
|
instance?: string
|
|
97
104
|
namespace?: string
|
|
98
105
|
page?: number
|
|
99
106
|
pageSize?: number
|
|
100
|
-
name?: string
|
|
101
|
-
|
|
107
|
+
name?: string
|
|
108
|
+
phase?: string
|
|
109
|
+
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
110
|
+
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export type ListMemberClusterDeploymentsRequest = {
|
|
114
|
+
instance?: string
|
|
115
|
+
cluster?: string
|
|
116
|
+
namespace?: string
|
|
117
|
+
page?: number
|
|
118
|
+
pageSize?: number
|
|
119
|
+
name?: string
|
|
102
120
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
103
121
|
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
104
122
|
}
|
|
105
123
|
|
|
124
|
+
export type ListMemberClusterDeploymentsResponse = {
|
|
125
|
+
items?: Deployment[]
|
|
126
|
+
pagination?: KairshipIoApiTypesPage.Pagination
|
|
127
|
+
}
|
|
128
|
+
|
|
106
129
|
export type ListDeploymentsResponse = {
|
|
107
130
|
items?: Deployment[]
|
|
108
131
|
pagination?: KairshipIoApiTypesPage.Pagination
|
|
@@ -112,8 +135,8 @@ export type ListInstanceDeploymentsRequest = {
|
|
|
112
135
|
instance?: string
|
|
113
136
|
page?: number
|
|
114
137
|
pageSize?: number
|
|
115
|
-
name?: string
|
|
116
|
-
|
|
138
|
+
name?: string
|
|
139
|
+
phase?: string
|
|
117
140
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
118
141
|
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
119
142
|
}
|
|
@@ -82,7 +82,7 @@ export type ListClustersRequest = {
|
|
|
82
82
|
pageSize?: number
|
|
83
83
|
role?: string[]
|
|
84
84
|
kubernetesVersion?: string
|
|
85
|
-
|
|
85
|
+
phase?: string
|
|
86
86
|
labels?: {[key: string]: string}
|
|
87
87
|
annotations?: {[key: string]: string}
|
|
88
88
|
managedBy?: string
|
|
@@ -107,4 +107,17 @@ export type ClusterRequest = {
|
|
|
107
107
|
|
|
108
108
|
export type ClusterResponse = {
|
|
109
109
|
cluster?: Cluster
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type ListClustersLabelsRequest = {
|
|
113
|
+
instance?: string
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type ListClustersLabelsResponse = {
|
|
117
|
+
clusterLabels?: ClusterLabels[]
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export type ClusterLabels = {
|
|
121
|
+
cluster?: string
|
|
122
|
+
labels?: {[key: string]: string}
|
|
110
123
|
}
|
|
@@ -43,7 +43,7 @@ export type NamespaceSummary = {
|
|
|
43
43
|
|
|
44
44
|
export type ListNamespacesRequest = {
|
|
45
45
|
instance?: string
|
|
46
|
-
name?: string
|
|
46
|
+
name?: string
|
|
47
47
|
page?: number
|
|
48
48
|
pageSize?: number
|
|
49
49
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
@@ -105,4 +105,19 @@ export type PatchNamespaceResponse = {
|
|
|
105
105
|
export type DeleteNamespaceRequest = {
|
|
106
106
|
instance?: string
|
|
107
107
|
name?: string
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type ListMemberClusterNamespaceSummaryRequest = {
|
|
111
|
+
instance?: string
|
|
112
|
+
cluster?: string
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export type ListMemberClusterNamespaceSummaryResponse = {
|
|
116
|
+
data?: MemberClusterNamespaceSummary[]
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type MemberClusterNamespaceSummary = {
|
|
120
|
+
name?: string
|
|
121
|
+
instance?: string
|
|
122
|
+
cluster?: string
|
|
108
123
|
}
|
|
@@ -77,10 +77,13 @@ export type ListPersistentVolumeClaimsRequest = {
|
|
|
77
77
|
namespace?: string
|
|
78
78
|
page?: number
|
|
79
79
|
pageSize?: number
|
|
80
|
-
name?: string
|
|
81
|
-
|
|
80
|
+
name?: string
|
|
81
|
+
phase?: string
|
|
82
82
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
83
83
|
orderBy?: KairshipIoApiTypesPage.SortDir
|
|
84
|
+
labelSelector?: string
|
|
85
|
+
fieldSelector?: string
|
|
86
|
+
accessMode?: AccessMode
|
|
84
87
|
}
|
|
85
88
|
|
|
86
89
|
export type ListPersistentVolumeClaimsResponse = {
|
|
@@ -456,7 +456,7 @@ export type ListPodsForMemberClusterRequest = {
|
|
|
456
456
|
kind?: ListPodsForMemberClusterRequestKind
|
|
457
457
|
kindName?: string
|
|
458
458
|
name?: string
|
|
459
|
-
|
|
459
|
+
phase?: string
|
|
460
460
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
461
461
|
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
462
462
|
labelSelector?: string
|
|
@@ -19,7 +19,7 @@ export type ListSecretsRequest = {
|
|
|
19
19
|
page?: number
|
|
20
20
|
pageSize?: number
|
|
21
21
|
namespace?: string
|
|
22
|
-
name?: string
|
|
22
|
+
name?: string
|
|
23
23
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
24
24
|
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
25
25
|
labelSelector?: string
|
|
@@ -37,7 +37,7 @@ export type ListSecretsForMemberClusterRequest = {
|
|
|
37
37
|
page?: number
|
|
38
38
|
pageSize?: number
|
|
39
39
|
namespace?: string
|
|
40
|
-
name?: string
|
|
40
|
+
name?: string
|
|
41
41
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
42
42
|
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
43
43
|
labelSelector?: string
|
|
@@ -21,4 +21,21 @@ export type Sample = {
|
|
|
21
21
|
export type samplePair = {
|
|
22
22
|
timestamp?: string
|
|
23
23
|
value?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type PrometheusQueryRangeRequest = {
|
|
27
|
+
instance?: string
|
|
28
|
+
query?: string
|
|
29
|
+
start?: string
|
|
30
|
+
end?: string
|
|
31
|
+
step?: number
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type PrometheusQueryRangeResult = {
|
|
35
|
+
matrix?: SampleStream[]
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type SampleStream = {
|
|
39
|
+
metric?: {[key: string]: string}
|
|
40
|
+
values?: samplePair[]
|
|
24
41
|
}
|
|
@@ -47,8 +47,8 @@ export type ListInstanceOverridePoliciesRequest = {
|
|
|
47
47
|
instance?: string
|
|
48
48
|
page?: number
|
|
49
49
|
pageSize?: number
|
|
50
|
-
name?: string
|
|
51
|
-
|
|
50
|
+
name?: string
|
|
51
|
+
phase?: string
|
|
52
52
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
53
53
|
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
54
54
|
}
|
|
@@ -10,22 +10,22 @@ import * as KairshipIoApiPolicyV1alpha1Types from "./types.pb"
|
|
|
10
10
|
|
|
11
11
|
export enum SpreadFieldValue {
|
|
12
12
|
SPREAD_FIELD_VALUE_UNSPECIFIED = "SPREAD_FIELD_VALUE_UNSPECIFIED",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
cluster = "cluster",
|
|
14
|
+
region = "region",
|
|
15
|
+
zone = "zone",
|
|
16
|
+
provider = "provider",
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export enum ReplicaSchedulingType {
|
|
20
20
|
REPLICA_SCHEDULING_TYPE_UNSPECIFIED = "REPLICA_SCHEDULING_TYPE_UNSPECIFIED",
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
Duplicated = "Duplicated",
|
|
22
|
+
Divided = "Divided",
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export enum ReplicaDivisionPreference {
|
|
26
26
|
REPLICA_DIVISION_PREFERENCE_UNSPECIFIED = "REPLICA_DIVISION_PREFERENCE_UNSPECIFIED",
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
Aggregated = "Aggregated",
|
|
28
|
+
Weighted = "Weighted",
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export enum DynamicWeightFactor {
|
|
@@ -96,8 +96,8 @@ export type ListInstancePropagationPoliciesRequest = {
|
|
|
96
96
|
instance?: string
|
|
97
97
|
page?: number
|
|
98
98
|
pageSize?: number
|
|
99
|
-
name?: string
|
|
100
|
-
|
|
99
|
+
name?: string
|
|
100
|
+
phase?: string
|
|
101
101
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
102
102
|
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
103
103
|
}
|
|
@@ -81,6 +81,9 @@ export class Cluster {
|
|
|
81
81
|
static UpdateJoinedCluster(req: KairshipIoApiClusterV1alpha1Cluster.ClusterRequest, initReq?: fm.InitReq): Promise<KairshipIoApiClusterV1alpha1Cluster.ClusterResponse> {
|
|
82
82
|
return fm.fetchReq<KairshipIoApiClusterV1alpha1Cluster.ClusterRequest, KairshipIoApiClusterV1alpha1Cluster.ClusterResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/clusters/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
83
83
|
}
|
|
84
|
+
static ListClustersLabels(req: KairshipIoApiClusterV1alpha1Cluster.ListClustersLabelsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiClusterV1alpha1Cluster.ListClustersLabelsResponse> {
|
|
85
|
+
return fm.fetchReq<KairshipIoApiClusterV1alpha1Cluster.ListClustersLabelsRequest, KairshipIoApiClusterV1alpha1Cluster.ListClustersLabelsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/clusters-labels?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
86
|
+
}
|
|
84
87
|
}
|
|
85
88
|
export class Core {
|
|
86
89
|
static ListNamespaces(req: KairshipIoApiCoreV1alpha1Namespace.ListNamespacesRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Namespace.ListNamespacesResponse> {
|
|
@@ -89,6 +92,9 @@ export class Core {
|
|
|
89
92
|
static ListNamespaceSummary(req: KairshipIoApiCoreV1alpha1Namespace.ListNamespaceSummaryRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Namespace.ListNamespaceSummaryResponse> {
|
|
90
93
|
return fm.fetchReq<KairshipIoApiCoreV1alpha1Namespace.ListNamespaceSummaryRequest, KairshipIoApiCoreV1alpha1Namespace.ListNamespaceSummaryResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespacesummary?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
91
94
|
}
|
|
95
|
+
static ListMemberClusterNamespaceSummary(req: KairshipIoApiCoreV1alpha1Namespace.ListMemberClusterNamespaceSummaryRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Namespace.ListMemberClusterNamespaceSummaryResponse> {
|
|
96
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Namespace.ListMemberClusterNamespaceSummaryRequest, KairshipIoApiCoreV1alpha1Namespace.ListMemberClusterNamespaceSummaryResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/member-clusters/${req["cluster"]}/namespacesummary?${fm.renderURLSearchParams(req, ["instance", "cluster"])}`, {...initReq, method: "GET"})
|
|
97
|
+
}
|
|
92
98
|
static GetNamespace(req: KairshipIoApiCoreV1alpha1Namespace.GetNamespaceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Namespace.GetNamespaceResponse> {
|
|
93
99
|
return fm.fetchReq<KairshipIoApiCoreV1alpha1Namespace.GetNamespaceRequest, KairshipIoApiCoreV1alpha1Namespace.GetNamespaceResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["name"]}?${fm.renderURLSearchParams(req, ["instance", "name"])}`, {...initReq, method: "GET"})
|
|
94
100
|
}
|
|
@@ -229,6 +235,15 @@ export class Apps {
|
|
|
229
235
|
static RestartDeployment(req: KairshipIoApiAppsV1alpha1Deployment.RestartDeploymentRequest, initReq?: fm.InitReq): Promise<KairshipIoApiAppsV1alpha1Deployment.RestartDeploymentResponse> {
|
|
230
236
|
return fm.fetchReq<KairshipIoApiAppsV1alpha1Deployment.RestartDeploymentRequest, KairshipIoApiAppsV1alpha1Deployment.RestartDeploymentResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/deployments/${req["name"]}:restart`, {...initReq, method: "POST"})
|
|
231
237
|
}
|
|
238
|
+
static ListMemberClusterDeployments(req: KairshipIoApiAppsV1alpha1Deployment.ListMemberClusterDeploymentsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiAppsV1alpha1Deployment.ListMemberClusterDeploymentsResponse> {
|
|
239
|
+
return fm.fetchReq<KairshipIoApiAppsV1alpha1Deployment.ListMemberClusterDeploymentsRequest, KairshipIoApiAppsV1alpha1Deployment.ListMemberClusterDeploymentsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/member-clusters/${req["cluster"]}/namespaces/${req["namespace"]}/deployments?${fm.renderURLSearchParams(req, ["instance", "cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
240
|
+
}
|
|
241
|
+
static ListMemberClusterAllDeployments(req: KairshipIoApiAppsV1alpha1Deployment.ListMemberClusterDeploymentsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiAppsV1alpha1Deployment.ListMemberClusterDeploymentsResponse> {
|
|
242
|
+
return fm.fetchReq<KairshipIoApiAppsV1alpha1Deployment.ListMemberClusterDeploymentsRequest, KairshipIoApiAppsV1alpha1Deployment.ListMemberClusterDeploymentsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/member-clusters/${req["cluster"]}/deployments?${fm.renderURLSearchParams(req, ["instance", "cluster"])}`, {...initReq, method: "GET"})
|
|
243
|
+
}
|
|
244
|
+
static PromoteMemberClusterDeployment(req: KairshipIoApiAppsV1alpha1Deployment.PromoteMemberClusterDeploymentRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
245
|
+
return fm.fetchReq<KairshipIoApiAppsV1alpha1Deployment.PromoteMemberClusterDeploymentRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/member-clusters/${req["cluster"]}/namespaces/${req["namespace"]}/deployments/${req["name"]}:promote`, {...initReq, method: "POST"})
|
|
246
|
+
}
|
|
232
247
|
}
|
|
233
248
|
export class Instance {
|
|
234
249
|
static CreateInstance(req: KairshipIoApiInstanceV1alpha1Instance.CreateInstanceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInstanceV1alpha1Instance.Instance> {
|
|
@@ -268,10 +283,13 @@ export class Insight {
|
|
|
268
283
|
static QueryMetric(req: KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryResult> {
|
|
269
284
|
return fm.fetchReq<KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryRequest, KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryResult>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/metric?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
270
285
|
}
|
|
286
|
+
static QueryRangeMetric(req: KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryRangeRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryRangeResult> {
|
|
287
|
+
return fm.fetchReq<KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryRangeRequest, KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryRangeResult>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/range-metric?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
288
|
+
}
|
|
271
289
|
}
|
|
272
|
-
export class
|
|
290
|
+
export class Aggregation {
|
|
273
291
|
static CreateAggregationResource(req: KairshipIoApiAggregationV1alpha1Aggregation.CreateAggregationResourceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiAggregationV1alpha1Aggregation.AggregationResource> {
|
|
274
|
-
return fm.fetchReq<KairshipIoApiAggregationV1alpha1Aggregation.CreateAggregationResourceRequest, KairshipIoApiAggregationV1alpha1Aggregation.AggregationResource>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/aggregationresource`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
292
|
+
return fm.fetchReq<KairshipIoApiAggregationV1alpha1Aggregation.CreateAggregationResourceRequest, KairshipIoApiAggregationV1alpha1Aggregation.AggregationResource>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/aggregationresource`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
275
293
|
}
|
|
276
294
|
}
|
|
277
295
|
export class Workspace {
|