@daocloud-proto/kpanda 0.15.0-dev-2003fdae → 0.15.0-dev-c2e3d030
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.
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as KpandaIoApiTypesObjectmeta from "../../types/objectmeta.pb"
|
|
8
|
+
import * as KpandaIoApiTypesPage from "../../types/page.pb"
|
|
8
9
|
export type ResourceQuota = {
|
|
9
10
|
metadata?: KpandaIoApiTypesObjectmeta.ObjectMeta
|
|
10
11
|
spec?: ResourceQuotaSpec
|
|
@@ -20,6 +21,24 @@ export type ResourceQuotaStatus = {
|
|
|
20
21
|
used?: {[key: string]: string}
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
export type ListResourceQuotasRequest = {
|
|
25
|
+
cluster?: string
|
|
26
|
+
namespace?: string
|
|
27
|
+
name?: string
|
|
28
|
+
page?: number
|
|
29
|
+
pageSize?: number
|
|
30
|
+
sortBy?: KpandaIoApiTypesPage.SortBy
|
|
31
|
+
sortDir?: KpandaIoApiTypesPage.SortDir
|
|
32
|
+
labelSelector?: string
|
|
33
|
+
fieldSelector?: string
|
|
34
|
+
fuzzyName?: string
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type ListResourceQuotasResponse = {
|
|
38
|
+
items?: ResourceQuota[]
|
|
39
|
+
pagination?: KpandaIoApiTypesPage.Pagination
|
|
40
|
+
}
|
|
41
|
+
|
|
23
42
|
export type GetResourceQuotaRequest = {
|
|
24
43
|
cluster?: string
|
|
25
44
|
namespace?: string
|
|
@@ -36,6 +55,11 @@ export type GetResourceQuotaJSONResponse = {
|
|
|
36
55
|
data?: string
|
|
37
56
|
}
|
|
38
57
|
|
|
58
|
+
export type ComputeResourceQuotaRequest = {
|
|
59
|
+
cluster?: string
|
|
60
|
+
namespace?: string
|
|
61
|
+
}
|
|
62
|
+
|
|
39
63
|
export type CreateResourceQuotaRequest = {
|
|
40
64
|
cluster?: string
|
|
41
65
|
namespace?: string
|
|
@@ -438,12 +438,18 @@ export class Core {
|
|
|
438
438
|
static UpdateServiceAccount(req: KpandaIoApiCoreV1alpha1Serviceaccount.UpdateServiceAccountRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Serviceaccount.UpdateServiceAccountResponse> {
|
|
439
439
|
return fm.fetchReq<KpandaIoApiCoreV1alpha1Serviceaccount.UpdateServiceAccountRequest, KpandaIoApiCoreV1alpha1Serviceaccount.UpdateServiceAccountResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/serviceaccounts/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
440
440
|
}
|
|
441
|
+
static ListResourceQuotas(req: KpandaIoApiCoreV1alpha1Resourcequota.ListResourceQuotasRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Resourcequota.ListResourceQuotasResponse> {
|
|
442
|
+
return fm.fetchReq<KpandaIoApiCoreV1alpha1Resourcequota.ListResourceQuotasRequest, KpandaIoApiCoreV1alpha1Resourcequota.ListResourceQuotasResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/resourcequotas?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
443
|
+
}
|
|
441
444
|
static GetResourceQuota(req: KpandaIoApiCoreV1alpha1Resourcequota.GetResourceQuotaRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Resourcequota.ResourceQuota> {
|
|
442
445
|
return fm.fetchReq<KpandaIoApiCoreV1alpha1Resourcequota.GetResourceQuotaRequest, KpandaIoApiCoreV1alpha1Resourcequota.ResourceQuota>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/resourcequotas/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
443
446
|
}
|
|
444
447
|
static GetResourceQuotaJSON(req: KpandaIoApiCoreV1alpha1Resourcequota.GetResourceQuotaJSONRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Resourcequota.GetResourceQuotaJSONResponse> {
|
|
445
448
|
return fm.fetchReq<KpandaIoApiCoreV1alpha1Resourcequota.GetResourceQuotaJSONRequest, KpandaIoApiCoreV1alpha1Resourcequota.GetResourceQuotaJSONResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/resourcequotas/${req["name"]}/json?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
446
449
|
}
|
|
450
|
+
static ComputeResourceQuota(req: KpandaIoApiCoreV1alpha1Resourcequota.ComputeResourceQuotaRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Resourcequota.ResourceQuota> {
|
|
451
|
+
return fm.fetchReq<KpandaIoApiCoreV1alpha1Resourcequota.ComputeResourceQuotaRequest, KpandaIoApiCoreV1alpha1Resourcequota.ResourceQuota>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/resourcequotas:compute?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
452
|
+
}
|
|
447
453
|
static CreateResourceQuota(req: KpandaIoApiCoreV1alpha1Resourcequota.CreateResourceQuotaRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Resourcequota.CreateResourceQuotaResponse> {
|
|
448
454
|
return fm.fetchReq<KpandaIoApiCoreV1alpha1Resourcequota.CreateResourceQuotaRequest, KpandaIoApiCoreV1alpha1Resourcequota.CreateResourceQuotaResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/resourcequotas`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
449
455
|
}
|