@daocloud-proto/kairship 0.0.7-8 → 0.0.8-16
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 +15 -11
- package/kairship.io/api/cloudshell/v1alpha1/cloudshell.pb.ts +33 -0
- package/kairship.io/api/cluster/v1alpha1/cluster.pb.ts +11 -1
- package/kairship.io/api/core/v1alpha1/namespace.pb.ts +16 -3
- package/kairship.io/api/core/v1alpha1/service.pb.ts +3 -1
- package/kairship.io/api/instance/v1alpha1/instance.pb.ts +82 -0
- package/kairship.io/api/v1alpha1/kairship.pb.ts +72 -8
- package/package.json +1 -1
- package/kairship.io/api/install/v1alpha1/karmadadeployment.pb.ts +0 -44
|
@@ -91,31 +91,35 @@ export type RestartDeploymentResponse = {
|
|
|
91
91
|
deployment?: Deployment
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
export type
|
|
95
|
-
|
|
96
|
-
pagination?: KairshipIoApiTypesPage.Pagination
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export type ListAllDeploymentsRequest = {
|
|
100
|
-
instance?: string[]
|
|
94
|
+
export type ListDeploymentsRequest = {
|
|
95
|
+
instance?: string
|
|
101
96
|
namespace?: string
|
|
102
97
|
page?: number
|
|
103
98
|
pageSize?: number
|
|
104
99
|
name?: string[]
|
|
105
100
|
phases?: string[]
|
|
106
101
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
107
|
-
|
|
102
|
+
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
108
103
|
}
|
|
109
104
|
|
|
110
|
-
export type
|
|
105
|
+
export type ListDeploymentsResponse = {
|
|
106
|
+
items?: Deployment[]
|
|
107
|
+
pagination?: KairshipIoApiTypesPage.Pagination
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type ListInstanceDeploymentsRequest = {
|
|
111
111
|
instance?: string
|
|
112
|
-
namespace?: string
|
|
113
112
|
page?: number
|
|
114
113
|
pageSize?: number
|
|
115
114
|
name?: string[]
|
|
116
115
|
phases?: string[]
|
|
117
116
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
118
|
-
|
|
117
|
+
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export type ListInstanceDeploymentsResponse = {
|
|
121
|
+
items?: Deployment[]
|
|
122
|
+
pagination?: KairshipIoApiTypesPage.Pagination
|
|
119
123
|
}
|
|
120
124
|
|
|
121
125
|
export type PatchDeploymentRequest = {
|
|
@@ -0,0 +1,33 @@
|
|
|
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 CloudShell = {
|
|
9
|
+
metadata?: KairshipIoApiTypesObjectmeta.ObjectMeta
|
|
10
|
+
spec?: CloudShellSpec
|
|
11
|
+
status?: CloudShellStatus
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type CloudShellSpec = {
|
|
15
|
+
commandAction?: string
|
|
16
|
+
once?: boolean
|
|
17
|
+
ttl?: number
|
|
18
|
+
cleanup?: boolean
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type CloudShellStatus = {
|
|
22
|
+
phase?: string
|
|
23
|
+
accessUrl?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type CreateCloudShellRequest = {
|
|
27
|
+
instance?: string
|
|
28
|
+
data?: CloudShell
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type GetorDeleteCloudShellRequest = {
|
|
32
|
+
name?: string
|
|
33
|
+
}
|
|
@@ -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 = {
|
|
@@ -72,8 +78,12 @@ export type ListClustersRequest = {
|
|
|
72
78
|
labels?: {[key: string]: string}
|
|
73
79
|
annotations?: {[key: string]: string}
|
|
74
80
|
managedBy?: string
|
|
75
|
-
sortBy?: KairshipIoApiTypesPage.
|
|
81
|
+
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
76
82
|
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
83
|
+
name?: string
|
|
84
|
+
region?: string
|
|
85
|
+
provider?: string
|
|
86
|
+
zone?: string
|
|
77
87
|
}
|
|
78
88
|
|
|
79
89
|
export type ListClustersResponse = {
|
|
@@ -28,13 +28,26 @@ export type NamespaceCondition = {
|
|
|
28
28
|
message?: string
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
export type ListNamespaceSummaryRequest = {
|
|
32
|
+
instance?: string
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type ListNamespaceSummaryResponse = {
|
|
36
|
+
data?: NamespaceSummary[]
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type NamespaceSummary = {
|
|
40
|
+
name?: string
|
|
41
|
+
instance?: string
|
|
42
|
+
}
|
|
43
|
+
|
|
31
44
|
export type ListNamespacesRequest = {
|
|
32
|
-
instance?: string
|
|
45
|
+
instance?: string
|
|
33
46
|
name?: string[]
|
|
34
47
|
page?: number
|
|
35
48
|
pageSize?: number
|
|
36
49
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
37
|
-
|
|
50
|
+
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
38
51
|
}
|
|
39
52
|
|
|
40
53
|
export type ListNamespacesResponse = {
|
|
@@ -73,7 +86,7 @@ export type UpdateNamespaceResponse = {
|
|
|
73
86
|
export type PatchNamespaceRequest = {
|
|
74
87
|
instance?: string
|
|
75
88
|
name?: string
|
|
76
|
-
data?:
|
|
89
|
+
data?: string
|
|
77
90
|
}
|
|
78
91
|
|
|
79
92
|
export type PatchNamespaceResponse = {
|
|
@@ -44,7 +44,7 @@ export type ServicePort = {
|
|
|
44
44
|
protocol?: string
|
|
45
45
|
appProtocol?: string
|
|
46
46
|
port?: number
|
|
47
|
-
targetPort?:
|
|
47
|
+
targetPort?: string
|
|
48
48
|
nodePort?: number
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -65,6 +65,8 @@ export type ListServicesRequest = {
|
|
|
65
65
|
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
66
66
|
orderBy?: KairshipIoApiTypesPage.SortDir
|
|
67
67
|
type?: ServiceType[]
|
|
68
|
+
labelSelector?: string
|
|
69
|
+
fieldSelector?: string
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
export type ListServicesResponse = {
|
|
@@ -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
|
+
}
|
|
@@ -7,8 +7,11 @@
|
|
|
7
7
|
import * as fm from "../../../fetch.pb"
|
|
8
8
|
import * as GoogleProtobufEmpty from "../../../google/api/empty.pb"
|
|
9
9
|
import * as KairshipIoApiAppsV1alpha1Deployment from "../apps/v1alpha1/deployment.pb"
|
|
10
|
+
import * as KairshipIoApiCloudshellV1alpha1Cloudshell from "../cloudshell/v1alpha1/cloudshell.pb"
|
|
10
11
|
import * as KairshipIoApiClusterV1alpha1Cluster from "../cluster/v1alpha1/cluster.pb"
|
|
11
|
-
import * as
|
|
12
|
+
import * as KairshipIoApiCoreV1alpha1Namespace from "../core/v1alpha1/namespace.pb"
|
|
13
|
+
import * as KairshipIoApiCoreV1alpha1Service from "../core/v1alpha1/service.pb"
|
|
14
|
+
import * as KairshipIoApiInstanceV1alpha1Instance from "../instance/v1alpha1/instance.pb"
|
|
12
15
|
import * as KairshipIoApiPolicyV1alpha1Overridepolicy from "../policy/v1alpha1/overridepolicy.pb"
|
|
13
16
|
import * as KairshipIoApiPolicyV1alpha1Pp from "../policy/v1alpha1/pp.pb"
|
|
14
17
|
export class Policy {
|
|
@@ -57,7 +60,54 @@ export class Cluster {
|
|
|
57
60
|
return fm.fetchReq<KairshipIoApiClusterV1alpha1Cluster.ClusterRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/clusters/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
58
61
|
}
|
|
59
62
|
}
|
|
63
|
+
export class Core {
|
|
64
|
+
static ListNamespaces(req: KairshipIoApiCoreV1alpha1Namespace.ListNamespacesRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Namespace.ListNamespacesResponse> {
|
|
65
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Namespace.ListNamespacesRequest, KairshipIoApiCoreV1alpha1Namespace.ListNamespacesResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
66
|
+
}
|
|
67
|
+
static ListNamespaceSummary(req: KairshipIoApiCoreV1alpha1Namespace.ListNamespaceSummaryRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Namespace.ListNamespaceSummaryResponse> {
|
|
68
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Namespace.ListNamespaceSummaryRequest, KairshipIoApiCoreV1alpha1Namespace.ListNamespaceSummaryResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespacesummary?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
69
|
+
}
|
|
70
|
+
static GetNamespaceJSON(req: KairshipIoApiCoreV1alpha1Namespace.GetNamespaceJSONRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Namespace.GetNamespaceJSONResponse> {
|
|
71
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Namespace.GetNamespaceJSONRequest, KairshipIoApiCoreV1alpha1Namespace.GetNamespaceJSONResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["name"]}/json?${fm.renderURLSearchParams(req, ["instance", "name"])}`, {...initReq, method: "GET"})
|
|
72
|
+
}
|
|
73
|
+
static DeleteNamespace(req: KairshipIoApiCoreV1alpha1Namespace.DeleteNamespaceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
74
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Namespace.DeleteNamespaceRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
75
|
+
}
|
|
76
|
+
static CreateNamespace(req: KairshipIoApiCoreV1alpha1Namespace.CreateNamespaceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Namespace.CreateNamespaceResponse> {
|
|
77
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Namespace.CreateNamespaceRequest, KairshipIoApiCoreV1alpha1Namespace.CreateNamespaceResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
78
|
+
}
|
|
79
|
+
static UpdateNamespace(req: KairshipIoApiCoreV1alpha1Namespace.UpdateNamespaceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Namespace.UpdateNamespaceResponse> {
|
|
80
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Namespace.UpdateNamespaceRequest, KairshipIoApiCoreV1alpha1Namespace.UpdateNamespaceResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
81
|
+
}
|
|
82
|
+
static PatchNamespace(req: KairshipIoApiCoreV1alpha1Namespace.PatchNamespaceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Namespace.PatchNamespaceResponse> {
|
|
83
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Namespace.PatchNamespaceRequest, KairshipIoApiCoreV1alpha1Namespace.PatchNamespaceResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["name"]}`, {...initReq, method: "PATCH", body: JSON.stringify(req, fm.replacer)})
|
|
84
|
+
}
|
|
85
|
+
static ListServices(req: KairshipIoApiCoreV1alpha1Service.ListServicesRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Service.ListServicesResponse> {
|
|
86
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Service.ListServicesRequest, KairshipIoApiCoreV1alpha1Service.ListServicesResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/services?${fm.renderURLSearchParams(req, ["instance", "namespace"])}`, {...initReq, method: "GET"})
|
|
87
|
+
}
|
|
88
|
+
static GetService(req: KairshipIoApiCoreV1alpha1Service.GetServiceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Service.Service> {
|
|
89
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Service.GetServiceRequest, KairshipIoApiCoreV1alpha1Service.Service>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/services/${req["name"]}?${fm.renderURLSearchParams(req, ["instance", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
90
|
+
}
|
|
91
|
+
static GetServiceJSON(req: KairshipIoApiCoreV1alpha1Service.GetServiceJSONRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Service.GetServiceJSONResponse> {
|
|
92
|
+
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"})
|
|
93
|
+
}
|
|
94
|
+
static CreateService(req: KairshipIoApiCoreV1alpha1Service.CreateServiceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Service.CreateServiceResponse> {
|
|
95
|
+
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)})
|
|
96
|
+
}
|
|
97
|
+
static PatchService(req: KairshipIoApiCoreV1alpha1Service.PatchServiceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Service.PatchServiceResponse> {
|
|
98
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Service.PatchServiceRequest, KairshipIoApiCoreV1alpha1Service.PatchServiceResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/services/${req["name"]}`, {...initReq, method: "PATCH", body: JSON.stringify(req, fm.replacer)})
|
|
99
|
+
}
|
|
100
|
+
static UpdateService(req: KairshipIoApiCoreV1alpha1Service.UpdateServiceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Service.UpdateServiceResponse> {
|
|
101
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Service.UpdateServiceRequest, KairshipIoApiCoreV1alpha1Service.UpdateServiceResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/services/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
102
|
+
}
|
|
103
|
+
static DeleteService(req: KairshipIoApiCoreV1alpha1Service.DeleteServiceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
104
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Service.DeleteServiceRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/services/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
105
|
+
}
|
|
106
|
+
}
|
|
60
107
|
export class Apps {
|
|
108
|
+
static ListInstanceDeployments(req: KairshipIoApiAppsV1alpha1Deployment.ListInstanceDeploymentsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiAppsV1alpha1Deployment.ListInstanceDeploymentsResponse> {
|
|
109
|
+
return fm.fetchReq<KairshipIoApiAppsV1alpha1Deployment.ListInstanceDeploymentsRequest, KairshipIoApiAppsV1alpha1Deployment.ListInstanceDeploymentsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/deployments?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
110
|
+
}
|
|
61
111
|
static ListDeployments(req: KairshipIoApiAppsV1alpha1Deployment.ListDeploymentsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiAppsV1alpha1Deployment.ListDeploymentsResponse> {
|
|
62
112
|
return fm.fetchReq<KairshipIoApiAppsV1alpha1Deployment.ListDeploymentsRequest, KairshipIoApiAppsV1alpha1Deployment.ListDeploymentsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/deployments?${fm.renderURLSearchParams(req, ["instance", "namespace"])}`, {...initReq, method: "GET"})
|
|
63
113
|
}
|
|
@@ -86,14 +136,28 @@ export class Apps {
|
|
|
86
136
|
return fm.fetchReq<KairshipIoApiAppsV1alpha1Deployment.RestartDeploymentRequest, KairshipIoApiAppsV1alpha1Deployment.RestartDeploymentResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/namespaces/${req["namespace"]}/deployments/${req["name"]}:restart`, {...initReq, method: "POST"})
|
|
87
137
|
}
|
|
88
138
|
}
|
|
89
|
-
export class
|
|
90
|
-
static
|
|
91
|
-
return fm.fetchReq<
|
|
139
|
+
export class Instance {
|
|
140
|
+
static CreateInstance(req: KairshipIoApiInstanceV1alpha1Instance.CreateInstanceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInstanceV1alpha1Instance.Instance> {
|
|
141
|
+
return fm.fetchReq<KairshipIoApiInstanceV1alpha1Instance.CreateInstanceRequest, KairshipIoApiInstanceV1alpha1Instance.Instance>(`/apis/kairship.io/v1alpha1/instances`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
142
|
+
}
|
|
143
|
+
static GetInstance(req: KairshipIoApiInstanceV1alpha1Instance.GetOrDeleteInstanceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInstanceV1alpha1Instance.Instance> {
|
|
144
|
+
return fm.fetchReq<KairshipIoApiInstanceV1alpha1Instance.GetOrDeleteInstanceRequest, KairshipIoApiInstanceV1alpha1Instance.Instance>(`/apis/kairship.io/v1alpha1/instances/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
|
|
145
|
+
}
|
|
146
|
+
static DeleteInstance(req: KairshipIoApiInstanceV1alpha1Instance.GetOrDeleteInstanceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
147
|
+
return fm.fetchReq<KairshipIoApiInstanceV1alpha1Instance.GetOrDeleteInstanceRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/instances/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
148
|
+
}
|
|
149
|
+
static ListInstances(req: KairshipIoApiInstanceV1alpha1Instance.ListInstanceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInstanceV1alpha1Instance.ListInstanceResponse> {
|
|
150
|
+
return fm.fetchReq<KairshipIoApiInstanceV1alpha1Instance.ListInstanceRequest, KairshipIoApiInstanceV1alpha1Instance.ListInstanceResponse>(`/apis/kairship.io/v1alpha1/instances?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
export class CloudShell {
|
|
154
|
+
static CreateCloudShell(req: KairshipIoApiCloudshellV1alpha1Cloudshell.CreateCloudShellRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCloudshellV1alpha1Cloudshell.CloudShell> {
|
|
155
|
+
return fm.fetchReq<KairshipIoApiCloudshellV1alpha1Cloudshell.CreateCloudShellRequest, KairshipIoApiCloudshellV1alpha1Cloudshell.CloudShell>(`/apis/kairship.io/v1alpha1/cloudshells`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
92
156
|
}
|
|
93
|
-
static
|
|
94
|
-
return fm.fetchReq<
|
|
157
|
+
static GetCloudShell(req: KairshipIoApiCloudshellV1alpha1Cloudshell.GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCloudshellV1alpha1Cloudshell.CloudShell> {
|
|
158
|
+
return fm.fetchReq<KairshipIoApiCloudshellV1alpha1Cloudshell.GetorDeleteCloudShellRequest, KairshipIoApiCloudshellV1alpha1Cloudshell.CloudShell>(`/apis/kairship.io/v1alpha1/cloudshells/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
|
|
95
159
|
}
|
|
96
|
-
static
|
|
97
|
-
return fm.fetchReq<
|
|
160
|
+
static DeleteCloudShell(req: KairshipIoApiCloudshellV1alpha1Cloudshell.GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
161
|
+
return fm.fetchReq<KairshipIoApiCloudshellV1alpha1Cloudshell.GetorDeleteCloudShellRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/cloudshells/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
98
162
|
}
|
|
99
163
|
}
|
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
|
-
}
|