@daocloud-proto/kairship 0.1.5 → 0.1.6
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/apps/v1alpha1/deployment.pb.ts +2 -1
- package/kairship.io/api/cluster/v1alpha1/cluster.pb.ts +5 -0
- package/kairship.io/api/core/v1alpha1/configmap.pb.ts +4 -2
- package/kairship.io/api/core/v1alpha1/event.pb.ts +56 -0
- package/kairship.io/api/core/v1alpha1/secret.pb.ts +21 -1
- package/kairship.io/api/instance/v1alpha1/instance.pb.ts +6 -0
- package/kairship.io/api/v1alpha1/kairship.pb.ts +54 -0
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import * as KairshipIoApiClusterV1alpha1Cluster from "../../cluster/v1alpha1/cluster.pb"
|
|
7
8
|
import * as KairshipIoApiCoreV1alpha1Pod from "../../core/v1alpha1/pod.pb"
|
|
8
9
|
import * as KairshipIoApiTypesObjectmeta from "../../types/objectmeta.pb"
|
|
9
10
|
import * as KairshipIoApiTypesPage from "../../types/page.pb"
|
|
@@ -26,7 +27,7 @@ export type DeploymentStatus = {
|
|
|
26
27
|
replicas?: number
|
|
27
28
|
state?: KairshipIoApiTypesObjectmeta.WorkloadState
|
|
28
29
|
conditions?: KairshipIoApiTypesObjectmeta.Condition[]
|
|
29
|
-
clusters?:
|
|
30
|
+
clusters?: KairshipIoApiClusterV1alpha1Cluster.ClusterProviderSummary[]
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
export type CreateDeploymentRequest = {
|
|
@@ -19,8 +19,10 @@ export type ListConfigMapsRequest = {
|
|
|
19
19
|
page?: number
|
|
20
20
|
pageSize?: number
|
|
21
21
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
22
|
-
|
|
22
|
+
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
23
23
|
name?: string[]
|
|
24
|
+
labelSelector?: string
|
|
25
|
+
fieldSelector?: string
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
export type ListConfigMapsResponse = {
|
|
@@ -29,7 +31,7 @@ export type ListConfigMapsResponse = {
|
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export type GetConfigMapRequest = {
|
|
32
|
-
|
|
34
|
+
instance?: string
|
|
33
35
|
namespace?: string
|
|
34
36
|
name?: string
|
|
35
37
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 KairshipIoApiTypesPage from "../../types/page.pb"
|
|
8
|
+
|
|
9
|
+
export enum EventType {
|
|
10
|
+
EVENT_TYPE_UNSPECIFIED = "EVENT_TYPE_UNSPECIFIED",
|
|
11
|
+
Normal = "Normal",
|
|
12
|
+
Warning = "Warning",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type Event = {
|
|
16
|
+
involvedObject?: ObjectReference
|
|
17
|
+
reason?: string
|
|
18
|
+
message?: string
|
|
19
|
+
source?: EventSource
|
|
20
|
+
lastTimestamp?: string
|
|
21
|
+
type?: EventType
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type ObjectReference = {
|
|
25
|
+
kind?: string
|
|
26
|
+
name?: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type EventSource = {
|
|
30
|
+
component?: string
|
|
31
|
+
host?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type ListInstanceEventsRequest = {
|
|
35
|
+
instance?: string
|
|
36
|
+
page?: number
|
|
37
|
+
pageSize?: number
|
|
38
|
+
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
39
|
+
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
40
|
+
type?: EventType[]
|
|
41
|
+
kind?: string
|
|
42
|
+
name?: string
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type ListInstanceEventsResponse = {
|
|
46
|
+
items?: Event[]
|
|
47
|
+
pagination?: KairshipIoApiTypesPage.Pagination
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type ListInstanceEventKindsRequest = {
|
|
51
|
+
instance?: string
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type ListInstanceEventKindsResponse = {
|
|
55
|
+
data?: string[]
|
|
56
|
+
}
|
|
@@ -21,7 +21,9 @@ export type ListSecretsRequest = {
|
|
|
21
21
|
namespace?: string
|
|
22
22
|
name?: string[]
|
|
23
23
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
24
|
-
|
|
24
|
+
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
25
|
+
labelSelector?: string
|
|
26
|
+
fieldSelector?: string
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
export type ListSecretsResponse = {
|
|
@@ -29,6 +31,24 @@ export type ListSecretsResponse = {
|
|
|
29
31
|
pagination?: KairshipIoApiTypesPage.Pagination
|
|
30
32
|
}
|
|
31
33
|
|
|
34
|
+
export type ListSecretsForMemberClusterRequest = {
|
|
35
|
+
instance?: string
|
|
36
|
+
cluster?: string
|
|
37
|
+
page?: number
|
|
38
|
+
pageSize?: number
|
|
39
|
+
namespace?: string
|
|
40
|
+
name?: string[]
|
|
41
|
+
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
42
|
+
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
43
|
+
labelSelector?: string
|
|
44
|
+
fieldSelector?: string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type ListSecretsForMemberClusterResponse = {
|
|
48
|
+
items?: Secret[]
|
|
49
|
+
pagination?: KairshipIoApiTypesPage.Pagination
|
|
50
|
+
}
|
|
51
|
+
|
|
32
52
|
export type GetSecretRequest = {
|
|
33
53
|
instance?: string
|
|
34
54
|
namespace?: string
|
|
@@ -61,9 +61,15 @@ export type InstanceStatusSummary = {
|
|
|
61
61
|
policyTotalNum?: {[key: string]: number}
|
|
62
62
|
clusterSummary?: NumStatistic
|
|
63
63
|
nodeSummary?: NumStatistic
|
|
64
|
+
resourceSummary?: ResourceSummary
|
|
64
65
|
workLoadSummary?: {[key: string]: NumStatistic}
|
|
65
66
|
}
|
|
66
67
|
|
|
68
|
+
export type ResourceSummary = {
|
|
69
|
+
allocatable?: {[key: string]: string}
|
|
70
|
+
allocated?: {[key: string]: string}
|
|
71
|
+
}
|
|
72
|
+
|
|
67
73
|
export type NumStatistic = {
|
|
68
74
|
totalNum?: number
|
|
69
75
|
readyNum?: number
|
|
@@ -9,8 +9,11 @@ import * as GoogleProtobufEmpty from "../../../google/api/empty.pb"
|
|
|
9
9
|
import * as KairshipIoApiAppsV1alpha1Deployment from "../apps/v1alpha1/deployment.pb"
|
|
10
10
|
import * as KairshipIoApiCloudshellV1alpha1Cloudshell from "../cloudshell/v1alpha1/cloudshell.pb"
|
|
11
11
|
import * as KairshipIoApiClusterV1alpha1Cluster from "../cluster/v1alpha1/cluster.pb"
|
|
12
|
+
import * as KairshipIoApiCoreV1alpha1Configmap from "../core/v1alpha1/configmap.pb"
|
|
13
|
+
import * as KairshipIoApiCoreV1alpha1Event from "../core/v1alpha1/event.pb"
|
|
12
14
|
import * as KairshipIoApiCoreV1alpha1Namespace from "../core/v1alpha1/namespace.pb"
|
|
13
15
|
import * as KairshipIoApiCoreV1alpha1Pod from "../core/v1alpha1/pod.pb"
|
|
16
|
+
import * as KairshipIoApiCoreV1alpha1Secret from "../core/v1alpha1/secret.pb"
|
|
14
17
|
import * as KairshipIoApiCoreV1alpha1Service from "../core/v1alpha1/service.pb"
|
|
15
18
|
import * as KairshipIoApiInstanceV1alpha1Instance from "../instance/v1alpha1/instance.pb"
|
|
16
19
|
import * as KairshipIoApiPolicyV1alpha1Overridepolicy from "../policy/v1alpha1/overridepolicy.pb"
|
|
@@ -128,6 +131,57 @@ export class Core {
|
|
|
128
131
|
static ListServicesForMemberCluster(req: KairshipIoApiCoreV1alpha1Service.ListServicesForMemberClusterRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Service.ListServicesForMemberClusterResponse> {
|
|
129
132
|
return fm.fetchReq<KairshipIoApiCoreV1alpha1Service.ListServicesForMemberClusterRequest, KairshipIoApiCoreV1alpha1Service.ListServicesForMemberClusterResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/services?${fm.renderURLSearchParams(req, ["instance", "cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
130
133
|
}
|
|
134
|
+
static ListConfigMaps(req: KairshipIoApiCoreV1alpha1Configmap.ListConfigMapsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Configmap.ListConfigMapsResponse> {
|
|
135
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Configmap.ListConfigMapsRequest, KairshipIoApiCoreV1alpha1Configmap.ListConfigMapsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/configmaps?${fm.renderURLSearchParams(req, ["instance", "namespace"])}`, {...initReq, method: "GET"})
|
|
136
|
+
}
|
|
137
|
+
static GetConfigMap(req: KairshipIoApiCoreV1alpha1Configmap.GetConfigMapRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Configmap.ConfigMap> {
|
|
138
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Configmap.GetConfigMapRequest, KairshipIoApiCoreV1alpha1Configmap.ConfigMap>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/configmaps/${req["name"]}?${fm.renderURLSearchParams(req, ["instance", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
139
|
+
}
|
|
140
|
+
static GetConfigMapJSON(req: KairshipIoApiCoreV1alpha1Configmap.GetConfigMapJSONRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Configmap.GetConfigMapJSONResponse> {
|
|
141
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Configmap.GetConfigMapJSONRequest, KairshipIoApiCoreV1alpha1Configmap.GetConfigMapJSONResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/configmaps/${req["name"]}/json?${fm.renderURLSearchParams(req, ["instance", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
142
|
+
}
|
|
143
|
+
static CreateConfigMap(req: KairshipIoApiCoreV1alpha1Configmap.CreateConfigMapRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Configmap.CreateConfigMapResponse> {
|
|
144
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Configmap.CreateConfigMapRequest, KairshipIoApiCoreV1alpha1Configmap.CreateConfigMapResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/configmaps`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
145
|
+
}
|
|
146
|
+
static UpdateConfigMap(req: KairshipIoApiCoreV1alpha1Configmap.UpdateConfigMapRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Configmap.UpdateConfigMapResponse> {
|
|
147
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Configmap.UpdateConfigMapRequest, KairshipIoApiCoreV1alpha1Configmap.UpdateConfigMapResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/configmaps/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
148
|
+
}
|
|
149
|
+
static PatchConfigMap(req: KairshipIoApiCoreV1alpha1Configmap.PatchConfigMapRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Configmap.PatchConfigMapResponse> {
|
|
150
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Configmap.PatchConfigMapRequest, KairshipIoApiCoreV1alpha1Configmap.PatchConfigMapResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/configmaps/${req["name"]}/json`, {...initReq, method: "PATCH", body: JSON.stringify(req, fm.replacer)})
|
|
151
|
+
}
|
|
152
|
+
static DeleteConfigMap(req: KairshipIoApiCoreV1alpha1Configmap.DeleteConfigMapRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
153
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Configmap.DeleteConfigMapRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/configmaps/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
154
|
+
}
|
|
155
|
+
static ListSecrets(req: KairshipIoApiCoreV1alpha1Secret.ListSecretsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Secret.ListSecretsResponse> {
|
|
156
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Secret.ListSecretsRequest, KairshipIoApiCoreV1alpha1Secret.ListSecretsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/secrets?${fm.renderURLSearchParams(req, ["instance", "namespace"])}`, {...initReq, method: "GET"})
|
|
157
|
+
}
|
|
158
|
+
static GetSecret(req: KairshipIoApiCoreV1alpha1Secret.GetSecretRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Secret.Secret> {
|
|
159
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Secret.GetSecretRequest, KairshipIoApiCoreV1alpha1Secret.Secret>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/secrets/${req["name"]}?${fm.renderURLSearchParams(req, ["instance", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
160
|
+
}
|
|
161
|
+
static GetSecretJSON(req: KairshipIoApiCoreV1alpha1Secret.GetSecretJSONRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Secret.GetSecretJSONResponse> {
|
|
162
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Secret.GetSecretJSONRequest, KairshipIoApiCoreV1alpha1Secret.GetSecretJSONResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/secrets/${req["name"]}/json?${fm.renderURLSearchParams(req, ["instance", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
163
|
+
}
|
|
164
|
+
static CreateSecret(req: KairshipIoApiCoreV1alpha1Secret.CreateSecretRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Secret.CreateSecretResponse> {
|
|
165
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Secret.CreateSecretRequest, KairshipIoApiCoreV1alpha1Secret.CreateSecretResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/secrets`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
166
|
+
}
|
|
167
|
+
static PatchSecret(req: KairshipIoApiCoreV1alpha1Secret.PatchSecretRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Secret.PatchSecretResponse> {
|
|
168
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Secret.PatchSecretRequest, KairshipIoApiCoreV1alpha1Secret.PatchSecretResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/secrets/${req["name"]}`, {...initReq, method: "PATCH", body: JSON.stringify(req, fm.replacer)})
|
|
169
|
+
}
|
|
170
|
+
static UpdateSecret(req: KairshipIoApiCoreV1alpha1Secret.UpdateSecretRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Secret.UpdateSecretResponse> {
|
|
171
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Secret.UpdateSecretRequest, KairshipIoApiCoreV1alpha1Secret.UpdateSecretResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/secrets/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
172
|
+
}
|
|
173
|
+
static DeleteSecret(req: KairshipIoApiCoreV1alpha1Secret.DeleteSecretRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
174
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Secret.DeleteSecretRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/secrets/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
175
|
+
}
|
|
176
|
+
static ListSecretsForMemberCluster(req: KairshipIoApiCoreV1alpha1Secret.ListSecretsForMemberClusterRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Secret.ListSecretsForMemberClusterResponse> {
|
|
177
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Secret.ListSecretsForMemberClusterRequest, KairshipIoApiCoreV1alpha1Secret.ListSecretsForMemberClusterResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/secrets?${fm.renderURLSearchParams(req, ["instance", "cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
178
|
+
}
|
|
179
|
+
static ListInstanceEvents(req: KairshipIoApiCoreV1alpha1Event.ListInstanceEventsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Event.ListInstanceEventsResponse> {
|
|
180
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Event.ListInstanceEventsRequest, KairshipIoApiCoreV1alpha1Event.ListInstanceEventsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/events?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
181
|
+
}
|
|
182
|
+
static ListInstanceEventKinds(req: KairshipIoApiCoreV1alpha1Event.ListInstanceEventKindsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Event.ListInstanceEventKindsResponse> {
|
|
183
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Event.ListInstanceEventKindsRequest, KairshipIoApiCoreV1alpha1Event.ListInstanceEventKindsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/events/kinds?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
184
|
+
}
|
|
131
185
|
}
|
|
132
186
|
export class Apps {
|
|
133
187
|
static ListInstanceDeployments(req: KairshipIoApiAppsV1alpha1Deployment.ListInstanceDeploymentsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiAppsV1alpha1Deployment.ListInstanceDeploymentsResponse> {
|