@daocloud-proto/mcamel-postgresql 0.11.0-rc1-1 → 0.15.0-rc1-5

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/cluster.pb.ts CHANGED
@@ -30,6 +30,8 @@ export enum PermissionsType {
30
30
  UpdateTemplate = "UpdateTemplate",
31
31
  DeleteTemplate = "DeleteTemplate",
32
32
  GetUserPassword = "GetUserPassword",
33
+ ExportTemplate = "ExportTemplate",
34
+ ImportTemplate = "ImportTemplate",
33
35
  }
34
36
 
35
37
  export enum EventType {
@@ -64,11 +66,37 @@ export enum ClusterItemNetworkMode {
64
66
  Calico = "Calico",
65
67
  }
66
68
 
69
+ export enum ClusterSettingPluginPluginName {
70
+ PLUGIN_NAME_UNSPECIFIED = "PLUGIN_NAME_UNSPECIFIED",
71
+ HPA = "HPA",
72
+ Insight = "Insight",
73
+ GPU = "GPU",
74
+ METALLB = "METALLB",
75
+ Spiderpool = "Spiderpool",
76
+ CustomMetrics = "CustomMetrics",
77
+ CronHPA = "CronHPA",
78
+ VPA = "VPA",
79
+ Hwameistor = "Hwameistor",
80
+ Flannel = "Flannel",
81
+ KubeOvn = "KubeOvn",
82
+ OLM = "OLM",
83
+ EgressGateway = "EgressGateway",
84
+ }
85
+
67
86
  export enum GetInsightAgentStatusRespInsightAgentStatus {
68
87
  NotInstall = "NotInstall",
69
88
  Install = "Install",
70
89
  }
71
90
 
91
+ export type GetClusterReq = {
92
+ workspaceId?: number
93
+ name?: string
94
+ }
95
+
96
+ export type GetClusterResp = {
97
+ cluster?: ClusterItem
98
+ }
99
+
72
100
  export type InstallFileReq = {
73
101
  cluster?: string
74
102
  path?: string
@@ -136,6 +164,8 @@ export type GetPermissionsListRespPermissions = {
136
164
  updateTemplate?: boolean
137
165
  deleteTemplate?: boolean
138
166
  getUserPassword?: boolean
167
+ exportTemplate?: boolean
168
+ importTemplate?: boolean
139
169
  }
140
170
 
141
171
  export type GetPermissionsListResp = {
@@ -351,6 +381,8 @@ export type ClusterItemMetadata = {
351
381
 
352
382
  export type ClusterItemStatus = {
353
383
  networkMode?: ClusterItemNetworkMode[]
384
+ setting?: ClusterSetting
385
+ clusterStatus?: CommonCommon.ClusterStatus
354
386
  }
355
387
 
356
388
  export type ClusterItem = {
@@ -358,6 +390,20 @@ export type ClusterItem = {
358
390
  status?: ClusterItemStatus
359
391
  }
360
392
 
393
+ export type ClusterSettingPlugin = {
394
+ name?: ClusterSettingPluginPluginName
395
+ enabled?: boolean
396
+ intelligentDetection?: boolean
397
+ externalAddress?: string
398
+ setting?: string
399
+ healthy?: boolean
400
+ }
401
+
402
+ export type ClusterSetting = {
403
+ plugins?: ClusterSettingPlugin[]
404
+ network?: ClusterSettingPlugin[]
405
+ }
406
+
361
407
  export type GetClusterNamespaceListReq = {
362
408
  workspaceId?: number
363
409
  cluster?: string
@@ -412,6 +458,9 @@ export class Cluster {
412
458
  static GetClusterList(req: GetClusterListReq, initReq?: fm.InitReq): Promise<GetClusterListResp> {
413
459
  return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
414
460
  }
461
+ static GetCluster(req: GetClusterReq, initReq?: fm.InitReq): Promise<GetClusterResp> {
462
+ return fm.fetchReq<GetClusterReq, GetClusterResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/clusters/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
463
+ }
415
464
  static GetClusterHostnetworkPorts(req: GetClusterHostnetworkPortsReq, initReq?: fm.InitReq): Promise<GetClusterHostnetworkPortsResp> {
416
465
  return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/hostnetwork-ports?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
417
466
  }
package/common.pb.ts CHANGED
@@ -50,6 +50,14 @@ export enum PodCommonConditionStatus {
50
50
  PodConditionStatusFalse = "PodConditionStatusFalse",
51
51
  }
52
52
 
53
+ export enum PodCommonFilterPodStatus {
54
+ UNSPECIFIED = "UNSPECIFIED",
55
+ RUNNING = "RUNNING",
56
+ ERROR = "ERROR",
57
+ COMPLETED = "COMPLETED",
58
+ WAITING = "WAITING",
59
+ }
60
+
53
61
  export type Affinity = {
54
62
  nodeAffinity?: NodeAffinity
55
63
  podAffinity?: PodAffinity
@@ -163,6 +171,8 @@ export type PodCommon = {
163
171
  initContainersName?: string[]
164
172
  initContainersStatuses?: ContainerStatus[]
165
173
  containersStatuses?: ContainerStatus[]
174
+ podStatus?: string
175
+ annotations?: {[key: string]: string}
166
176
  }
167
177
 
168
178
  export type OwnerReference = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-postgresql",
3
- "version":"0.11.0-rc1-1",
3
+ "version":"0.15.0-rc1-5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/postgresql.pb.ts CHANGED
@@ -21,6 +21,7 @@ export enum Status {
21
21
  Failed = "Failed",
22
22
  Running = "Running",
23
23
  Creating = "Creating",
24
+ Unknown = "Unknown",
24
25
  }
25
26
 
26
27
  export enum GetPostgresqlTopologyRespNodePodStatus {
@@ -29,12 +30,30 @@ export enum GetPostgresqlTopologyRespNodePodStatus {
29
30
  Succeeded = "Succeeded",
30
31
  Failed = "Failed",
31
32
  Unknown = "Unknown",
33
+ Terminating = "Terminating",
32
34
  }
33
35
 
34
36
  export enum GetPostgresqlTopologyRespNodeRole {
35
37
  RoleUnknown = "RoleUnknown",
36
- RoleMaster = "RoleMaster",
37
- RoleReplica = "RoleReplica",
38
+ Primary = "Primary",
39
+ Standby = "Standby",
40
+ }
41
+
42
+ export enum GetPostgresqlTopologyRespNodeSyncState {
43
+ SyncStateUnknown = "SyncStateUnknown",
44
+ Sync = "Sync",
45
+ Async = "Async",
46
+ Potential = "Potential",
47
+ Quorum = "Quorum",
48
+ }
49
+
50
+ export enum GetPostgresqlTopologyRespNodeState {
51
+ StateUnknown = "StateUnknown",
52
+ Startup = "Startup",
53
+ Catchup = "Catchup",
54
+ Streaming = "Streaming",
55
+ Backup = "Backup",
56
+ Stopping = "Stopping",
38
57
  }
39
58
 
40
59
  export enum GetPostgresqlS3ConfigListReqSortDir {
@@ -109,8 +128,8 @@ export enum GetPostgresqlPodListRespPodStatus {
109
128
  }
110
129
 
111
130
  export enum GetPostgresqlPodListRespPodType {
112
- Master = "Master",
113
- Replica = "Replica",
131
+ Primary = "Primary",
132
+ Standby = "Standby",
114
133
  PgAdmin = "PgAdmin",
115
134
  }
116
135
 
@@ -124,6 +143,13 @@ export enum GetPostgresqlConfRespItemsParamType {
124
143
  conf = "conf",
125
144
  }
126
145
 
146
+ export enum PostgresqlItemStatusRestoreInitialStatus {
147
+ Unknown = "Unknown",
148
+ Running = "Running",
149
+ Failed = "Failed",
150
+ Succeeded = "Succeeded",
151
+ }
152
+
127
153
  export type GetPostgresqlTopologyReq = {
128
154
  cluster?: string
129
155
  namespace?: string
@@ -143,7 +169,12 @@ export type GetPostgresqlTopologyRespNode = {
143
169
  podCpuLimit?: string
144
170
  podMemoryLimit?: string
145
171
  role?: GetPostgresqlTopologyRespNodeRole
146
- syncState?: string
172
+ syncState?: GetPostgresqlTopologyRespNodeSyncState
173
+ state?: GetPostgresqlTopologyRespNodeState
174
+ sentLsn?: string
175
+ writeLsn?: string
176
+ flushLsn?: string
177
+ replayLsn?: string
147
178
  }
148
179
 
149
180
  export type GetPostgresqlTopologyRespEdges = {
@@ -578,6 +609,7 @@ export type PostgresqlItemStatus = {
578
609
  avgReplicationLagInBytes?: string
579
610
  common?: CommonCommon.CommonItemStatus
580
611
  isControl?: boolean
612
+ restoreInitialStatus?: PostgresqlItemStatusRestoreInitialStatus
581
613
  }
582
614
 
583
615
  export type PostgresqlItemMetadata = {
@@ -646,7 +678,7 @@ export class Postgresql {
646
678
  return fm.fetchReq<CreatePostgresqlRestoreReq, CreatePostgresqlRestoreResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/restore`, {...initReq, method: "POST", body: JSON.stringify(req)})
647
679
  }
648
680
  static DeletePostgresqlBackup(req: DeletePostgresqlBackupReq, initReq?: fm.InitReq): Promise<DeletePostgresqlBackupResp> {
649
- return fm.fetchReq<DeletePostgresqlBackupReq, DeletePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/backups/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/${req["backupName"]}`, {...initReq, method: "DELETE"})
681
+ return fm.fetchReq<DeletePostgresqlBackupReq, DeletePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/backups/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/${req["backupName"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req)})
650
682
  }
651
683
  static UpdatePostgresqlBackupConfig(req: UpdatePostgresqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlBackupConfigResp> {
652
684
  return fm.fetchReq<UpdatePostgresqlBackupConfigReq, UpdatePostgresqlBackupConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
package/template.pb.ts CHANGED
@@ -44,7 +44,6 @@ export type UpdateTemplateConfigToItemReq = {
44
44
 
45
45
  export type UpdateTemplateConfigToItemResp = {
46
46
  items?: TemplateConfigItem[]
47
- pagination?: CommonCommon.Pagination
48
47
  }
49
48
 
50
49
  export type GetTemplateConfigVersionsReq = {
@@ -57,6 +56,7 @@ export type GetTemplateConfigVersionsResp = {
57
56
 
58
57
  export type GetTemplateConfigStringResp = {
59
58
  conf?: string
59
+ fileName?: string
60
60
  }
61
61
 
62
62
  export type DeleteTemplateReq = {
@@ -88,6 +88,11 @@ export type GetTemplateConfigReq = {
88
88
  templateInstanceType?: TemplateInstanceType
89
89
  }
90
90
 
91
+ export type GetTemplateConfigStringReq = {
92
+ workspaceId?: number
93
+ name?: string
94
+ }
95
+
91
96
  export type CreateTemplateConfigResp = {
92
97
  message?: string
93
98
  }
@@ -177,8 +182,8 @@ export class Template {
177
182
  static UpdateTemplateConfig(req: UpdateTemplateConfigReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigResp> {
178
183
  return fm.fetchReq<UpdateTemplateConfigReq, UpdateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
179
184
  }
180
- static GetTemplateConfigString(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
181
- return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigStringResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/to_string?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
185
+ static GetTemplateConfigString(req: GetTemplateConfigStringReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
186
+ return fm.fetchReq<GetTemplateConfigStringReq, GetTemplateConfigStringResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/to_string?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
182
187
  }
183
188
  static UpdateTemplateConfigToItem(req: UpdateTemplateConfigToItemReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigToItemResp> {
184
189
  return fm.fetchReq<UpdateTemplateConfigToItemReq, UpdateTemplateConfigToItemResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/to_template`, {...initReq, method: "PUT", body: JSON.stringify(req)})