@daocloud-proto/kairship 0.1.5-8 → 0.1.6-10
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 +1 -0
- package/kairship.io/api/core/v1alpha1/event.pb.ts +56 -0
- package/kairship.io/api/core/v1alpha1/pod.pb.ts +5 -0
- package/kairship.io/api/core/v1alpha1/service.pb.ts +19 -0
- package/kairship.io/api/instance/v1alpha1/instance.pb.ts +6 -0
- package/kairship.io/api/v1alpha1/kairship.pb.ts +10 -0
- package/package.json +1 -1
|
@@ -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
|
+
}
|
|
@@ -34,6 +34,11 @@ export enum ContainerStatusPhase {
|
|
|
34
34
|
export enum ListPodsForMemberClusterRequestKind {
|
|
35
35
|
KIND_UNSPECIFIED = "KIND_UNSPECIFIED",
|
|
36
36
|
Deployment = "Deployment",
|
|
37
|
+
StatefulSet = "StatefulSet",
|
|
38
|
+
DaemonSet = "DaemonSet",
|
|
39
|
+
Service = "Service",
|
|
40
|
+
Job = "Job",
|
|
41
|
+
CronJob = "CronJob",
|
|
37
42
|
}
|
|
38
43
|
|
|
39
44
|
export type PodTemplateSpec = {
|
|
@@ -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 KairshipIoApiTypesObjectmeta from "../../types/objectmeta.pb"
|
|
8
9
|
import * as KairshipIoApiTypesPage from "../../types/page.pb"
|
|
9
10
|
|
|
@@ -22,6 +23,11 @@ export enum ListServicesRequestKind {
|
|
|
22
23
|
DaemonSet = "DaemonSet",
|
|
23
24
|
}
|
|
24
25
|
|
|
26
|
+
export enum CreateWorkloadServiceRequestKind {
|
|
27
|
+
KIND_UNSPECIFIED = "KIND_UNSPECIFIED",
|
|
28
|
+
Deployment = "Deployment",
|
|
29
|
+
}
|
|
30
|
+
|
|
25
31
|
export enum ListServicesForMemberClusterRequestKind {
|
|
26
32
|
KIND_UNSPECIFIED = "KIND_UNSPECIFIED",
|
|
27
33
|
Deployment = "Deployment",
|
|
@@ -32,6 +38,7 @@ export enum ListServicesForMemberClusterRequestKind {
|
|
|
32
38
|
export type Service = {
|
|
33
39
|
metadata?: KairshipIoApiTypesObjectmeta.ObjectMeta
|
|
34
40
|
spec?: ServiceSpec
|
|
41
|
+
status?: ServiceStatus
|
|
35
42
|
}
|
|
36
43
|
|
|
37
44
|
export type ServiceSpec = {
|
|
@@ -46,6 +53,10 @@ export type ServiceSpec = {
|
|
|
46
53
|
iPFamilies?: string[]
|
|
47
54
|
}
|
|
48
55
|
|
|
56
|
+
export type ServiceStatus = {
|
|
57
|
+
clusters?: KairshipIoApiClusterV1alpha1Cluster.ClusterProviderSummary[]
|
|
58
|
+
}
|
|
59
|
+
|
|
49
60
|
export type ServicePort = {
|
|
50
61
|
name?: string
|
|
51
62
|
protocol?: string
|
|
@@ -97,6 +108,14 @@ export type GetServiceJSONResponse = {
|
|
|
97
108
|
data?: string
|
|
98
109
|
}
|
|
99
110
|
|
|
111
|
+
export type CreateWorkloadServiceRequest = {
|
|
112
|
+
instance?: string
|
|
113
|
+
namespace?: string
|
|
114
|
+
kind?: CreateWorkloadServiceRequestKind
|
|
115
|
+
kindName?: string
|
|
116
|
+
data?: string
|
|
117
|
+
}
|
|
118
|
+
|
|
100
119
|
export type CreateServiceRequest = {
|
|
101
120
|
instance?: string
|
|
102
121
|
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
|
|
@@ -10,6 +10,7 @@ import * as KairshipIoApiAppsV1alpha1Deployment from "../apps/v1alpha1/deploymen
|
|
|
10
10
|
import * as KairshipIoApiCloudshellV1alpha1Cloudshell from "../cloudshell/v1alpha1/cloudshell.pb"
|
|
11
11
|
import * as KairshipIoApiClusterV1alpha1Cluster from "../cluster/v1alpha1/cluster.pb"
|
|
12
12
|
import * as KairshipIoApiCoreV1alpha1Configmap from "../core/v1alpha1/configmap.pb"
|
|
13
|
+
import * as KairshipIoApiCoreV1alpha1Event from "../core/v1alpha1/event.pb"
|
|
13
14
|
import * as KairshipIoApiCoreV1alpha1Namespace from "../core/v1alpha1/namespace.pb"
|
|
14
15
|
import * as KairshipIoApiCoreV1alpha1Pod from "../core/v1alpha1/pod.pb"
|
|
15
16
|
import * as KairshipIoApiCoreV1alpha1Secret from "../core/v1alpha1/secret.pb"
|
|
@@ -112,6 +113,9 @@ export class Core {
|
|
|
112
113
|
static GetServiceJSON(req: KairshipIoApiCoreV1alpha1Service.GetServiceJSONRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Service.GetServiceJSONResponse> {
|
|
113
114
|
return fm.fetchReq<KairshipIoApiCoreV1alpha1Service.GetServiceJSONRequest, KairshipIoApiCoreV1alpha1Service.GetServiceJSONResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/services/${req["name"]}/json?${fm.renderURLSearchParams(req, ["instance", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
114
115
|
}
|
|
116
|
+
static CreateWorkloadService(req: KairshipIoApiCoreV1alpha1Service.CreateWorkloadServiceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
117
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Service.CreateWorkloadServiceRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/workloadservices`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
118
|
+
}
|
|
115
119
|
static CreateService(req: KairshipIoApiCoreV1alpha1Service.CreateServiceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Service.CreateServiceResponse> {
|
|
116
120
|
return fm.fetchReq<KairshipIoApiCoreV1alpha1Service.CreateServiceRequest, KairshipIoApiCoreV1alpha1Service.CreateServiceResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/services`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
117
121
|
}
|
|
@@ -175,6 +179,12 @@ export class Core {
|
|
|
175
179
|
static ListSecretsForMemberCluster(req: KairshipIoApiCoreV1alpha1Secret.ListSecretsForMemberClusterRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Secret.ListSecretsForMemberClusterResponse> {
|
|
176
180
|
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"})
|
|
177
181
|
}
|
|
182
|
+
static ListInstanceEvents(req: KairshipIoApiCoreV1alpha1Event.ListInstanceEventsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Event.ListInstanceEventsResponse> {
|
|
183
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Event.ListInstanceEventsRequest, KairshipIoApiCoreV1alpha1Event.ListInstanceEventsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/events?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
184
|
+
}
|
|
185
|
+
static ListInstanceEventKinds(req: KairshipIoApiCoreV1alpha1Event.ListInstanceEventKindsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Event.ListInstanceEventKindsResponse> {
|
|
186
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Event.ListInstanceEventKindsRequest, KairshipIoApiCoreV1alpha1Event.ListInstanceEventKindsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/events/kinds?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
187
|
+
}
|
|
178
188
|
}
|
|
179
189
|
export class Apps {
|
|
180
190
|
static ListInstanceDeployments(req: KairshipIoApiAppsV1alpha1Deployment.ListInstanceDeploymentsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiAppsV1alpha1Deployment.ListInstanceDeploymentsResponse> {
|