@daocloud-proto/kpanda 0.15.0-dev-30bdfc14 → 0.15.0-dev-6cc9dc44
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,30 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as KpandaIoApiTypesObjectmeta from "../../types/objectmeta.pb"
|
|
8
|
+
import * as KpandaIoApiTypesPage from "../../types/page.pb"
|
|
9
|
+
import * as KpandaIoApiCoreV1alpha1Event from "./event.pb"
|
|
10
|
+
import * as KpandaIoApiCoreV1alpha1Pod from "./pod.pb"
|
|
11
|
+
|
|
12
|
+
export enum PersistentVolumeMode {
|
|
13
|
+
PERSISTENT_VOLUME_MODE_UNSPECIFIED = "PERSISTENT_VOLUME_MODE_UNSPECIFIED",
|
|
14
|
+
Block = "Block",
|
|
15
|
+
Filesystem = "Filesystem",
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export enum PersistentVolumeReclaimPolicy {
|
|
19
|
+
PERSISTENT_VOLUME_RECLAIM_POLICY_UNSPECIFIED = "PERSISTENT_VOLUME_RECLAIM_POLICY_UNSPECIFIED",
|
|
20
|
+
Recycle = "Recycle",
|
|
21
|
+
Delete = "Delete",
|
|
22
|
+
Retain = "Retain",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export enum PersistentVolumeAccessMode {
|
|
26
|
+
PERSISTENT_VOLUME_ACCESS_MODE_UNSPECIFIED = "PERSISTENT_VOLUME_ACCESS_MODE_UNSPECIFIED",
|
|
27
|
+
ReadWriteOnce = "ReadWriteOnce",
|
|
28
|
+
ReadOnlyMany = "ReadOnlyMany",
|
|
29
|
+
ReadWriteMany = "ReadWriteMany",
|
|
30
|
+
ReadWriteOncePod = "ReadWriteOncePod",
|
|
31
|
+
}
|
|
8
32
|
|
|
9
33
|
export enum PersistentVolumeStatusPhase {
|
|
10
34
|
PHASE_UNSPECIFIED = "PHASE_UNSPECIFIED",
|
|
@@ -17,16 +41,82 @@ export enum PersistentVolumeStatusPhase {
|
|
|
17
41
|
|
|
18
42
|
export type PersistentVolume = {
|
|
19
43
|
metadata?: KpandaIoApiTypesObjectmeta.ObjectMeta
|
|
44
|
+
spec?: PersistentVolumeSpec
|
|
20
45
|
status?: PersistentVolumeStatus
|
|
21
46
|
}
|
|
22
47
|
|
|
48
|
+
export type PersistentVolumeSpec = {
|
|
49
|
+
capacity?: {[key: string]: string}
|
|
50
|
+
accessModes?: PersistentVolumeAccessMode[]
|
|
51
|
+
claimRef?: KpandaIoApiCoreV1alpha1Event.ObjectReference
|
|
52
|
+
persistentVolumeReclaimPolicy?: PersistentVolumeReclaimPolicy
|
|
53
|
+
storageClassName?: string
|
|
54
|
+
mountOptions?: string[]
|
|
55
|
+
volumeMode?: PersistentVolumeMode
|
|
56
|
+
nodeAffinity?: VolumeNodeAffinity
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type VolumeNodeAffinity = {
|
|
60
|
+
required?: KpandaIoApiCoreV1alpha1Pod.NodeSelector
|
|
61
|
+
}
|
|
62
|
+
|
|
23
63
|
export type PersistentVolumeStatus = {
|
|
24
64
|
phase?: PersistentVolumeStatusPhase
|
|
25
65
|
message?: string
|
|
26
66
|
reason?: string
|
|
27
67
|
}
|
|
28
68
|
|
|
69
|
+
export type ListPersistentVolumesRequest = {
|
|
70
|
+
cluster?: string
|
|
71
|
+
name?: string
|
|
72
|
+
page?: number
|
|
73
|
+
pageSize?: number
|
|
74
|
+
sortBy?: KpandaIoApiTypesPage.SortBy
|
|
75
|
+
sortDir?: KpandaIoApiTypesPage.SortDir
|
|
76
|
+
labelSelector?: string
|
|
77
|
+
fieldSelector?: string
|
|
78
|
+
fuzzyName?: string
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type ListPersistentVolumesResponse = {
|
|
82
|
+
items?: PersistentVolume[]
|
|
83
|
+
pagination?: KpandaIoApiTypesPage.Pagination
|
|
84
|
+
}
|
|
85
|
+
|
|
29
86
|
export type GetPersistentVolumeRequest = {
|
|
30
87
|
cluster?: string
|
|
31
88
|
name?: string
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type GetPersistentVolumeJSONRequest = {
|
|
92
|
+
cluster?: string
|
|
93
|
+
name?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type GetPersistentVolumeJSONResponse = {
|
|
97
|
+
data?: string
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export type CreatePersistentVolumeRequest = {
|
|
101
|
+
cluster?: string
|
|
102
|
+
data?: string
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type CreatePersistentVolumeResponse = {
|
|
106
|
+
data?: string
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type UpdatePersistentVolumeRequest = {
|
|
110
|
+
cluster?: string
|
|
111
|
+
name?: string
|
|
112
|
+
data?: string
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export type UpdatePersistentVolumeResponse = {
|
|
116
|
+
data?: string
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type DeletePersistentVolumeRequest = {
|
|
120
|
+
cluster?: string
|
|
121
|
+
name?: string
|
|
32
122
|
}
|
|
@@ -6,16 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
import * as KpandaIoApiTypesObjectmeta from "../../types/objectmeta.pb"
|
|
8
8
|
import * as KpandaIoApiTypesPage from "../../types/page.pb"
|
|
9
|
+
import * as KpandaIoApiCoreV1alpha1Persistentvolume from "./persistentvolume.pb"
|
|
9
10
|
import * as KpandaIoApiCoreV1alpha1Pod from "./pod.pb"
|
|
10
11
|
|
|
11
|
-
export enum AccessMode {
|
|
12
|
-
ACCESS_MODE_UNSPECIFIED = "ACCESS_MODE_UNSPECIFIED",
|
|
13
|
-
ReadWriteOnce = "ReadWriteOnce",
|
|
14
|
-
ReadOnlyMany = "ReadOnlyMany",
|
|
15
|
-
ReadWriteMany = "ReadWriteMany",
|
|
16
|
-
ReadWriteOncePod = "ReadWriteOncePod",
|
|
17
|
-
}
|
|
18
|
-
|
|
19
12
|
export enum PersistentVolumeClaimSpecVolumeMode {
|
|
20
13
|
VOLUME_MODE_UNSPECIFIED = "VOLUME_MODE_UNSPECIFIED",
|
|
21
14
|
Block = "Block",
|
|
@@ -36,7 +29,7 @@ export type PersistentVolumeClaim = {
|
|
|
36
29
|
}
|
|
37
30
|
|
|
38
31
|
export type PersistentVolumeClaimSpec = {
|
|
39
|
-
accessModes?:
|
|
32
|
+
accessModes?: KpandaIoApiCoreV1alpha1Persistentvolume.PersistentVolumeAccessMode[]
|
|
40
33
|
selector?: KpandaIoApiTypesObjectmeta.LabelSelector
|
|
41
34
|
resources?: KpandaIoApiCoreV1alpha1Pod.ResourceRequirements
|
|
42
35
|
volumeName?: string
|
|
@@ -50,7 +43,7 @@ export type PersistentVolumeClaimSpec = {
|
|
|
50
43
|
|
|
51
44
|
export type PersistentVolumeClaimStatus = {
|
|
52
45
|
phase?: PersistentVolumeClaimStatusPhase
|
|
53
|
-
accessModes?:
|
|
46
|
+
accessModes?: KpandaIoApiCoreV1alpha1Persistentvolume.PersistentVolumeAccessMode[]
|
|
54
47
|
capacity?: KpandaIoApiCoreV1alpha1Pod.ResourceList
|
|
55
48
|
conditions?: PersistentVolumeClaimCondition[]
|
|
56
49
|
podName?: string[]
|
|
@@ -83,7 +76,7 @@ export type ListPersistentVolumeClaimsRequest = {
|
|
|
83
76
|
sortDir?: KpandaIoApiTypesPage.SortDir
|
|
84
77
|
labelSelector?: string
|
|
85
78
|
fieldSelector?: string
|
|
86
|
-
accessMode?:
|
|
79
|
+
accessMode?: KpandaIoApiCoreV1alpha1Persistentvolume.PersistentVolumeAccessMode
|
|
87
80
|
fuzzyName?: string
|
|
88
81
|
}
|
|
89
82
|
|
|
@@ -102,7 +95,7 @@ export type ListClusterPersistentVolumeClaimsRequest = {
|
|
|
102
95
|
sortDir?: KpandaIoApiTypesPage.SortDir
|
|
103
96
|
labelSelector?: string
|
|
104
97
|
fieldSelector?: string
|
|
105
|
-
accessMode?:
|
|
98
|
+
accessMode?: KpandaIoApiCoreV1alpha1Persistentvolume.PersistentVolumeAccessMode
|
|
106
99
|
fuzzyName?: string
|
|
107
100
|
}
|
|
108
101
|
|
|
@@ -468,9 +468,6 @@ export class Core {
|
|
|
468
468
|
static GetPersistentVolumeClaim(req: KpandaIoApiCoreV1alpha1Persistentvolumeclaim.GetPersistentVolumeClaimRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Persistentvolumeclaim.PersistentVolumeClaim> {
|
|
469
469
|
return fm.fetchReq<KpandaIoApiCoreV1alpha1Persistentvolumeclaim.GetPersistentVolumeClaimRequest, KpandaIoApiCoreV1alpha1Persistentvolumeclaim.PersistentVolumeClaim>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/persistentvolumeclaims/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
470
470
|
}
|
|
471
|
-
static GetPersistentVolume(req: KpandaIoApiCoreV1alpha1Persistentvolume.GetPersistentVolumeRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Persistentvolume.PersistentVolume> {
|
|
472
|
-
return fm.fetchReq<KpandaIoApiCoreV1alpha1Persistentvolume.GetPersistentVolumeRequest, KpandaIoApiCoreV1alpha1Persistentvolume.PersistentVolume>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/persistentvolumes/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"})
|
|
473
|
-
}
|
|
474
471
|
static DeletePersistentVolumeClaim(req: KpandaIoApiCoreV1alpha1Persistentvolumeclaim.DeletePersistentVolumeClaimRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
475
472
|
return fm.fetchReq<KpandaIoApiCoreV1alpha1Persistentvolumeclaim.DeletePersistentVolumeClaimRequest, GoogleProtobufEmpty.Empty>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/persistentvolumeclaims/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
476
473
|
}
|
|
@@ -492,6 +489,24 @@ export class Core {
|
|
|
492
489
|
static CreatePersistentVolumeClaim(req: KpandaIoApiCoreV1alpha1Persistentvolumeclaim.CreatePersistentVolumeClaimRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Persistentvolumeclaim.CreatePersistentVolumeClaimResponse> {
|
|
493
490
|
return fm.fetchReq<KpandaIoApiCoreV1alpha1Persistentvolumeclaim.CreatePersistentVolumeClaimRequest, KpandaIoApiCoreV1alpha1Persistentvolumeclaim.CreatePersistentVolumeClaimResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/persistentvolumeclaims`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
494
491
|
}
|
|
492
|
+
static ListPersistentVolumes(req: KpandaIoApiCoreV1alpha1Persistentvolume.ListPersistentVolumesRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Persistentvolume.ListPersistentVolumesResponse> {
|
|
493
|
+
return fm.fetchReq<KpandaIoApiCoreV1alpha1Persistentvolume.ListPersistentVolumesRequest, KpandaIoApiCoreV1alpha1Persistentvolume.ListPersistentVolumesResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/persistentvolumes?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
494
|
+
}
|
|
495
|
+
static GetPersistentVolume(req: KpandaIoApiCoreV1alpha1Persistentvolume.GetPersistentVolumeRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Persistentvolume.PersistentVolume> {
|
|
496
|
+
return fm.fetchReq<KpandaIoApiCoreV1alpha1Persistentvolume.GetPersistentVolumeRequest, KpandaIoApiCoreV1alpha1Persistentvolume.PersistentVolume>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/persistentvolumes/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"})
|
|
497
|
+
}
|
|
498
|
+
static GetPersistentVolumeJSON(req: KpandaIoApiCoreV1alpha1Persistentvolume.GetPersistentVolumeJSONRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Persistentvolume.GetPersistentVolumeJSONResponse> {
|
|
499
|
+
return fm.fetchReq<KpandaIoApiCoreV1alpha1Persistentvolume.GetPersistentVolumeJSONRequest, KpandaIoApiCoreV1alpha1Persistentvolume.GetPersistentVolumeJSONResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/persistentvolumes/${req["name"]}/json?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"})
|
|
500
|
+
}
|
|
501
|
+
static CreatePersistentVolume(req: KpandaIoApiCoreV1alpha1Persistentvolume.CreatePersistentVolumeRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Persistentvolume.CreatePersistentVolumeResponse> {
|
|
502
|
+
return fm.fetchReq<KpandaIoApiCoreV1alpha1Persistentvolume.CreatePersistentVolumeRequest, KpandaIoApiCoreV1alpha1Persistentvolume.CreatePersistentVolumeResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/persistentvolumes`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
503
|
+
}
|
|
504
|
+
static UpdatePersistentVolume(req: KpandaIoApiCoreV1alpha1Persistentvolume.UpdatePersistentVolumeRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Persistentvolume.UpdatePersistentVolumeResponse> {
|
|
505
|
+
return fm.fetchReq<KpandaIoApiCoreV1alpha1Persistentvolume.UpdatePersistentVolumeRequest, KpandaIoApiCoreV1alpha1Persistentvolume.UpdatePersistentVolumeResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/persistentvolumes/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
506
|
+
}
|
|
507
|
+
static DeletePersistentVolume(req: KpandaIoApiCoreV1alpha1Persistentvolume.DeletePersistentVolumeRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
508
|
+
return fm.fetchReq<KpandaIoApiCoreV1alpha1Persistentvolume.DeletePersistentVolumeRequest, GoogleProtobufEmpty.Empty>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/persistentvolumes/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
509
|
+
}
|
|
495
510
|
static GetSecretJSON(req: KpandaIoApiCoreV1alpha1Secret.GetSecretJSONRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Secret.GetSecretJSONResponse> {
|
|
496
511
|
return fm.fetchReq<KpandaIoApiCoreV1alpha1Secret.GetSecretJSONRequest, KpandaIoApiCoreV1alpha1Secret.GetSecretJSONResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/secrets/${req["name"]}/json?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
497
512
|
}
|