@daocloud-proto/kairship 0.1.6 → 0.1.9
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/pod.pb.ts +5 -0
- package/kairship.io/api/core/v1alpha1/service.pb.ts +36 -0
- package/kairship.io/api/insight/v1alpha1/prometheus.pb.ts +24 -0
- package/kairship.io/api/v1alpha1/kairship.pb.ts +18 -0
- package/package.json +1 -1
|
@@ -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
|
|
@@ -61,6 +72,23 @@ export type SessionAffinityConfig = {
|
|
|
61
72
|
export type LoadBalancerStatus = {
|
|
62
73
|
}
|
|
63
74
|
|
|
75
|
+
export type ListInstanceServicesRequest = {
|
|
76
|
+
instance?: string
|
|
77
|
+
name?: string
|
|
78
|
+
page?: number
|
|
79
|
+
pageSize?: number
|
|
80
|
+
sortBy?: KairshipIoApiTypesPage.SortBy
|
|
81
|
+
sortDir?: KairshipIoApiTypesPage.SortDir
|
|
82
|
+
type?: ServiceType[]
|
|
83
|
+
labelSelector?: string
|
|
84
|
+
fieldSelector?: string
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export type ListInstanceServicesResponse = {
|
|
88
|
+
items?: Service[]
|
|
89
|
+
pagination?: KairshipIoApiTypesPage.Pagination
|
|
90
|
+
}
|
|
91
|
+
|
|
64
92
|
export type ListServicesRequest = {
|
|
65
93
|
instance?: string
|
|
66
94
|
namespace?: string
|
|
@@ -97,6 +125,14 @@ export type GetServiceJSONResponse = {
|
|
|
97
125
|
data?: string
|
|
98
126
|
}
|
|
99
127
|
|
|
128
|
+
export type CreateWorkloadServiceRequest = {
|
|
129
|
+
instance?: string
|
|
130
|
+
namespace?: string
|
|
131
|
+
kind?: CreateWorkloadServiceRequestKind
|
|
132
|
+
kindName?: string
|
|
133
|
+
data?: string
|
|
134
|
+
}
|
|
135
|
+
|
|
100
136
|
export type CreateServiceRequest = {
|
|
101
137
|
instance?: string
|
|
102
138
|
namespace?: string
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
export type PrometheusQueryRequest = {
|
|
7
|
+
instance?: string
|
|
8
|
+
query?: string
|
|
9
|
+
time?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type PrometheusQueryResult = {
|
|
13
|
+
vector?: Sample[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type Sample = {
|
|
17
|
+
metric?: {[key: string]: string}
|
|
18
|
+
values?: samplePair
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type samplePair = {
|
|
22
|
+
timestamp?: string
|
|
23
|
+
value?: string
|
|
24
|
+
}
|
|
@@ -15,6 +15,7 @@ import * as KairshipIoApiCoreV1alpha1Namespace from "../core/v1alpha1/namespace.
|
|
|
15
15
|
import * as KairshipIoApiCoreV1alpha1Pod from "../core/v1alpha1/pod.pb"
|
|
16
16
|
import * as KairshipIoApiCoreV1alpha1Secret from "../core/v1alpha1/secret.pb"
|
|
17
17
|
import * as KairshipIoApiCoreV1alpha1Service from "../core/v1alpha1/service.pb"
|
|
18
|
+
import * as KairshipIoApiInsightV1alpha1Prometheus from "../insight/v1alpha1/prometheus.pb"
|
|
18
19
|
import * as KairshipIoApiInstanceV1alpha1Instance from "../instance/v1alpha1/instance.pb"
|
|
19
20
|
import * as KairshipIoApiPolicyV1alpha1Overridepolicy from "../policy/v1alpha1/overridepolicy.pb"
|
|
20
21
|
import * as KairshipIoApiPolicyV1alpha1Pp from "../policy/v1alpha1/pp.pb"
|
|
@@ -104,6 +105,9 @@ export class Core {
|
|
|
104
105
|
static PatchNamespace(req: KairshipIoApiCoreV1alpha1Namespace.PatchNamespaceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Namespace.PatchNamespaceResponse> {
|
|
105
106
|
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)})
|
|
106
107
|
}
|
|
108
|
+
static ListInstanceServices(req: KairshipIoApiCoreV1alpha1Service.ListInstanceServicesRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Service.ListInstanceServicesResponse> {
|
|
109
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Service.ListInstanceServicesRequest, KairshipIoApiCoreV1alpha1Service.ListInstanceServicesResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/services?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
110
|
+
}
|
|
107
111
|
static ListServices(req: KairshipIoApiCoreV1alpha1Service.ListServicesRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Service.ListServicesResponse> {
|
|
108
112
|
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"})
|
|
109
113
|
}
|
|
@@ -113,6 +117,9 @@ export class Core {
|
|
|
113
117
|
static GetServiceJSON(req: KairshipIoApiCoreV1alpha1Service.GetServiceJSONRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Service.GetServiceJSONResponse> {
|
|
114
118
|
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"})
|
|
115
119
|
}
|
|
120
|
+
static CreateWorkloadService(req: KairshipIoApiCoreV1alpha1Service.CreateWorkloadServiceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
121
|
+
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)})
|
|
122
|
+
}
|
|
116
123
|
static CreateService(req: KairshipIoApiCoreV1alpha1Service.CreateServiceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Service.CreateServiceResponse> {
|
|
117
124
|
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)})
|
|
118
125
|
}
|
|
@@ -131,6 +138,9 @@ export class Core {
|
|
|
131
138
|
static ListServicesForMemberCluster(req: KairshipIoApiCoreV1alpha1Service.ListServicesForMemberClusterRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Service.ListServicesForMemberClusterResponse> {
|
|
132
139
|
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"})
|
|
133
140
|
}
|
|
141
|
+
static ListInstanceConfigMaps(req: KairshipIoApiCoreV1alpha1Configmap.ListConfigMapsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Configmap.ListConfigMapsResponse> {
|
|
142
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Configmap.ListConfigMapsRequest, KairshipIoApiCoreV1alpha1Configmap.ListConfigMapsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/configmaps?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
143
|
+
}
|
|
134
144
|
static ListConfigMaps(req: KairshipIoApiCoreV1alpha1Configmap.ListConfigMapsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Configmap.ListConfigMapsResponse> {
|
|
135
145
|
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
146
|
}
|
|
@@ -155,6 +165,9 @@ export class Core {
|
|
|
155
165
|
static ListSecrets(req: KairshipIoApiCoreV1alpha1Secret.ListSecretsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Secret.ListSecretsResponse> {
|
|
156
166
|
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
167
|
}
|
|
168
|
+
static ListInstanceSecrets(req: KairshipIoApiCoreV1alpha1Secret.ListSecretsRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Secret.ListSecretsResponse> {
|
|
169
|
+
return fm.fetchReq<KairshipIoApiCoreV1alpha1Secret.ListSecretsRequest, KairshipIoApiCoreV1alpha1Secret.ListSecretsResponse>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/secrets?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
170
|
+
}
|
|
158
171
|
static GetSecret(req: KairshipIoApiCoreV1alpha1Secret.GetSecretRequest, initReq?: fm.InitReq): Promise<KairshipIoApiCoreV1alpha1Secret.Secret> {
|
|
159
172
|
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
173
|
}
|
|
@@ -248,4 +261,9 @@ export class CloudShell {
|
|
|
248
261
|
static DeleteCloudShell(req: KairshipIoApiCloudshellV1alpha1Cloudshell.GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
249
262
|
return fm.fetchReq<KairshipIoApiCloudshellV1alpha1Cloudshell.GetorDeleteCloudShellRequest, GoogleProtobufEmpty.Empty>(`/apis/kairship.io/v1alpha1/cloudshells/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
250
263
|
}
|
|
264
|
+
}
|
|
265
|
+
export class Insight {
|
|
266
|
+
static QueryMetric(req: KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryResult> {
|
|
267
|
+
return fm.fetchReq<KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryRequest, KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryResult>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/metric?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
268
|
+
}
|
|
251
269
|
}
|