kb-cloud-client-typescript 2.3.60 → 2.3.61

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.
Files changed (68) hide show
  1. package/dist/adminapi/models/component-item-create.d.ts +8 -0
  2. package/dist/adminapi/models/component-item-create.d.ts.map +1 -1
  3. package/dist/adminapi/models/component-item.d.ts +8 -0
  4. package/dist/adminapi/models/component-item.d.ts.map +1 -1
  5. package/dist/adminapi/models/component-option.d.ts +6 -0
  6. package/dist/adminapi/models/component-option.d.ts.map +1 -1
  7. package/dist/adminapi/models/index.d.ts +1 -0
  8. package/dist/adminapi/models/index.d.ts.map +1 -1
  9. package/dist/adminapi/models/index.js +1 -0
  10. package/dist/adminapi/models/index.js.map +1 -1
  11. package/dist/adminapi/models/static-cluster-component.d.ts +43 -0
  12. package/dist/adminapi/models/static-cluster-component.d.ts.map +1 -0
  13. package/dist/adminapi/models/static-cluster-component.js +16 -0
  14. package/dist/adminapi/models/static-cluster-component.js.map +1 -0
  15. package/dist/adminapi/models/static-cluster.d.ts +4 -15
  16. package/dist/adminapi/models/static-cluster.d.ts.map +1 -1
  17. package/dist/internalapi/api.d.ts +1 -0
  18. package/dist/internalapi/api.d.ts.map +1 -1
  19. package/dist/internalapi/api.js +1 -0
  20. package/dist/internalapi/api.js.map +1 -1
  21. package/dist/internalapi/apis/victoria-logs-cluster-api.d.ts +113 -0
  22. package/dist/internalapi/apis/victoria-logs-cluster-api.d.ts.map +1 -0
  23. package/dist/internalapi/apis/victoria-logs-cluster-api.js +135 -0
  24. package/dist/internalapi/apis/victoria-logs-cluster-api.js.map +1 -0
  25. package/dist/internalapi/apis/victoria-metrics-cluster-api.d.ts +11 -2
  26. package/dist/internalapi/apis/victoria-metrics-cluster-api.d.ts.map +1 -1
  27. package/dist/internalapi/apis/victoria-metrics-cluster-api.js +9 -5
  28. package/dist/internalapi/apis/victoria-metrics-cluster-api.js.map +1 -1
  29. package/dist/internalapi/models/component-item.d.ts +8 -0
  30. package/dist/internalapi/models/component-item.d.ts.map +1 -1
  31. package/dist/internalapi/models/index.d.ts +1 -0
  32. package/dist/internalapi/models/index.d.ts.map +1 -1
  33. package/dist/internalapi/models/index.js +1 -0
  34. package/dist/internalapi/models/index.js.map +1 -1
  35. package/dist/internalapi/models/static-cluster-component.d.ts +43 -0
  36. package/dist/internalapi/models/static-cluster-component.d.ts.map +1 -0
  37. package/dist/internalapi/models/static-cluster-component.js +16 -0
  38. package/dist/internalapi/models/static-cluster-component.js.map +1 -0
  39. package/dist/internalapi/models/static-cluster.d.ts +4 -15
  40. package/dist/internalapi/models/static-cluster.d.ts.map +1 -1
  41. package/dist/openapi/models/component-item-create.d.ts +8 -0
  42. package/dist/openapi/models/component-item-create.d.ts.map +1 -1
  43. package/dist/openapi/models/component-item.d.ts +8 -0
  44. package/dist/openapi/models/component-item.d.ts.map +1 -1
  45. package/dist/openapi/models/component-option.d.ts +6 -0
  46. package/dist/openapi/models/component-option.d.ts.map +1 -1
  47. package/package.json +1 -1
  48. package/src/adminapi/.openapi-generator/FILES +1 -0
  49. package/src/adminapi/models/component-item-create.ts +6 -0
  50. package/src/adminapi/models/component-item.ts +6 -0
  51. package/src/adminapi/models/component-option.ts +6 -0
  52. package/src/adminapi/models/index.ts +1 -0
  53. package/src/adminapi/models/static-cluster-component.ts +48 -0
  54. package/src/adminapi/models/static-cluster.ts +6 -15
  55. package/src/adminapi.yaml +43 -10
  56. package/src/internalapi/.openapi-generator/FILES +2 -0
  57. package/src/internalapi/api.ts +1 -0
  58. package/src/internalapi/apis/victoria-logs-cluster-api.ts +183 -0
  59. package/src/internalapi/apis/victoria-metrics-cluster-api.ts +19 -5
  60. package/src/internalapi/models/component-item.ts +6 -0
  61. package/src/internalapi/models/index.ts +1 -0
  62. package/src/internalapi/models/static-cluster-component.ts +48 -0
  63. package/src/internalapi/models/static-cluster.ts +6 -15
  64. package/src/internalapi.yaml +72 -8
  65. package/src/openapi/models/component-item-create.ts +6 -0
  66. package/src/openapi/models/component-item.ts +6 -0
  67. package/src/openapi/models/component-option.ts +6 -0
  68. package/src/openapi.yaml +14 -0
@@ -0,0 +1,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Admin API
5
+ * The Admin API is used to manage the ApeCloud platform.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@apecloud.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface StaticClusterComponent
21
+ */
22
+ export interface StaticClusterComponent {
23
+ /**
24
+ * Exact component name supported by the selected engine during environment installation. Each component may appear only once.
25
+ * @type {string}
26
+ * @memberof StaticClusterComponent
27
+ */
28
+ 'component': string;
29
+ /**
30
+ * Number of replicas. Omit to keep the installer default.
31
+ * @type {number}
32
+ * @memberof StaticClusterComponent
33
+ */
34
+ 'replicas'?: number | null;
35
+ /**
36
+ * Resource class for this exact engine, mode and component. Omit to keep the installer default.
37
+ * @type {string}
38
+ * @memberof StaticClusterComponent
39
+ */
40
+ 'classCode'?: string;
41
+ /**
42
+ * Disk capacity in Gi. Only vm-storage, vlstorage and minio accept this field.
43
+ * @type {number}
44
+ * @memberof StaticClusterComponent
45
+ */
46
+ 'storage'?: number | null;
47
+ }
48
+
@@ -13,6 +13,9 @@
13
13
  */
14
14
 
15
15
 
16
+ // May contain unused imports in some cases
17
+ // @ts-ignore
18
+ import type { StaticClusterComponent } from './static-cluster-component';
16
19
 
17
20
  /**
18
21
  *
@@ -21,22 +24,10 @@
21
24
  */
22
25
  export interface StaticCluster {
23
26
  /**
24
- * the number of replicas
25
- * @type {number}
27
+ * Optional component overrides. Unknown, duplicate or other-engine components are rejected.
28
+ * @type {Array<StaticClusterComponent>}
26
29
  * @memberof StaticCluster
27
30
  */
28
- 'replicas'?: number;
29
- /**
30
- * Storage size, the unit is Gi.
31
- * @type {number}
32
- * @memberof StaticCluster
33
- */
34
- 'storage'?: number;
35
- /**
36
- *
37
- * @type {string}
38
- * @memberof StaticCluster
39
- */
40
- 'classCode'?: string;
31
+ 'components'?: Array<StaticClusterComponent>;
41
32
  }
42
33
 
package/src/adminapi.yaml CHANGED
@@ -31228,6 +31228,11 @@ components:
31228
31228
  additionalProperties:
31229
31229
  type: string
31230
31230
  description: User-provided component annotations, merged over chart defaults. Platform-managed keys cannot be overridden. Omitted or empty preserves defaults; empty string values are literal values, not deletions.
31231
+ labels:
31232
+ type: object
31233
+ additionalProperties:
31234
+ type: string
31235
+ description: User-provided component labels, merged over chart defaults. Key prefixes before / matching kubeblocks.io, kubernetes.io, k8s.io or any of their subdomains are reserved. Keys and values must satisfy Kubernetes label syntax. Omitted or empty preserves defaults; empty string values are literal values, not deletions.
31231
31236
  nodeGroup:
31232
31237
  type: string
31233
31238
  description: Optional host group in this environment and the explicitly selected availabilityZone. Requires availabilityZone; no upper-level host group is inherited.
@@ -31577,6 +31582,11 @@ components:
31577
31582
  additionalProperties:
31578
31583
  type: string
31579
31584
  description: User-provided component annotations. Does not include chart defaults or system-generated values.
31585
+ labels:
31586
+ type: object
31587
+ additionalProperties:
31588
+ type: string
31589
+ description: User-provided component labels. Does not include chart defaults or system-generated values.
31580
31590
  nodeGroup:
31581
31591
  type: string
31582
31592
  description: Optional host group in this environment. Explicit placement does not inherit an upper-level host group.
@@ -37372,20 +37382,39 @@ components:
37372
37382
  description: the tags for the storage
37373
37383
  additionalProperties:
37374
37384
  type: string
37375
- staticCluster:
37385
+ staticClusterComponent:
37386
+ type: object
37387
+ required:
37388
+ - component
37376
37389
  properties:
37390
+ component:
37391
+ type: string
37392
+ minLength: 1
37393
+ description: Exact component name supported by the selected engine during environment installation. Each component may appear only once.
37377
37394
  replicas:
37378
- title: Replicas
37379
37395
  type: integer
37380
- description: the number of replicas
37381
- storage:
37382
- title: Storage(Gi)
37396
+ format: int64
37397
+ nullable: true
37383
37398
  minimum: 1
37384
- type: number
37385
- description: Storage size, the unit is Gi.
37386
- format: double
37399
+ description: Number of replicas. Omit to keep the installer default.
37387
37400
  classCode:
37388
37401
  type: string
37402
+ description: Resource class for this exact engine, mode and component. Omit to keep the installer default.
37403
+ storage:
37404
+ type: number
37405
+ format: double
37406
+ nullable: true
37407
+ minimum: 1
37408
+ description: Disk capacity in Gi. Only vm-storage, vlstorage and minio accept this field.
37409
+ staticCluster:
37410
+ type: object
37411
+ properties:
37412
+ components:
37413
+ type: array
37414
+ maxItems: 3
37415
+ description: Optional component overrides. Unknown, duplicate or other-engine components are rejected.
37416
+ items:
37417
+ $ref: '#/components/schemas/staticClusterComponent'
37389
37418
  environmentStorage:
37390
37419
  type: object
37391
37420
  description: Storage config
@@ -37522,10 +37551,10 @@ components:
37522
37551
  storage:
37523
37552
  $ref: '#/components/schemas/storageConfig'
37524
37553
  victoriaMetrics:
37525
- description: Optional vm-storage spec (replicas, disk, classCode) when adding an environment. vm-insert and vm-select keep installer defaults.
37554
+ description: Optional per-component resources for vm-storage, vm-select and vm-insert. Omitted components and fields keep installer defaults; only vm-storage accepts disk capacity.
37526
37555
  $ref: '#/components/schemas/staticCluster'
37527
37556
  victoriaLogs:
37528
- description: Optional vlstorage spec (replicas, disk, classCode) when adding an environment. vlinsert and vlselect keep installer defaults.
37557
+ description: Optional per-component resources for vlstorage, vlselect and vlinsert. Omitted components and fields keep installer defaults; only vlstorage accepts disk capacity.
37529
37558
  $ref: '#/components/schemas/staticCluster'
37530
37559
  modules:
37531
37560
  type: array
@@ -40787,6 +40816,10 @@ components:
40787
40816
  type: boolean
40788
40817
  description: Whether to show the component annotations editor during cluster creation. Omitted or false hides the editor. This is a UI visibility hint and does not restrict the cluster creation API. Applies to this component in every engine mode, including sharding templates, on KubeBlocks 0.9 and 1.0.
40789
40818
  x-nullable: false
40819
+ customLabels:
40820
+ type: boolean
40821
+ description: Whether to show the component labels editor during cluster creation. Omitted or false hides the editor. This is a UI visibility hint and does not restrict the cluster creation API. Applies to this component in every engine mode, including sharding templates, on KubeBlocks 0.9 and 1.0.
40822
+ x-nullable: false
40790
40823
  customSecret:
40791
40824
  type: boolean
40792
40825
  description: whether the component supports custom secret
@@ -16,6 +16,7 @@ apis/recycle-bin-cluster-api.ts
16
16
  apis/shared-api.ts
17
17
  apis/slaapi.ts
18
18
  apis/storage-api.ts
19
+ apis/victoria-logs-cluster-api.ts
19
20
  apis/victoria-metrics-cluster-api.ts
20
21
  base.ts
21
22
  common.ts
@@ -78,6 +79,7 @@ models/postable-alert.ts
78
79
  models/scheduling-policy-type.ts
79
80
  models/service-descriptor.ts
80
81
  models/service-ref.ts
82
+ models/static-cluster-component.ts
81
83
  models/static-cluster.ts
82
84
  models/storage-create.ts
83
85
  models/storage.ts
@@ -28,5 +28,6 @@ export * from './apis/recycle-bin-cluster-api';
28
28
  export * from './apis/slaapi';
29
29
  export * from './apis/shared-api';
30
30
  export * from './apis/storage-api';
31
+ export * from './apis/victoria-logs-cluster-api';
31
32
  export * from './apis/victoria-metrics-cluster-api';
32
33
 
@@ -0,0 +1,183 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KubeBlocks Cloud Internal API
5
+ * The Internal API is using for interaction of ApeCloud platform microservices.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import type { Configuration } from '../configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
22
+ // @ts-ignore
23
+ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
+ // @ts-ignore
25
+ import type { APIErrorResponse } from '../models';
26
+ // @ts-ignore
27
+ import type { Cluster } from '../models';
28
+ // @ts-ignore
29
+ import type { StaticCluster } from '../models';
30
+ /**
31
+ * VictoriaLogsClusterApi - axios parameter creator
32
+ * @export
33
+ */
34
+ export const VictoriaLogsClusterApiAxiosParamCreator = function (configuration?: Configuration) {
35
+ return {
36
+ /**
37
+ * Create VictoriaLogs with optional per-component resources. Omitted components keep installer defaults.
38
+ * @summary Create VictoriaLogs cluster
39
+ * @param {string} environmentName name of the environment
40
+ * @param {StaticCluster} [staticCluster]
41
+ * @param {*} [options] Override http request option.
42
+ * @throws {RequiredError}
43
+ */
44
+ createVictoriaLogsCluster: async (environmentName: string, staticCluster?: StaticCluster, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
45
+ // verify required parameter 'environmentName' is not null or undefined
46
+ assertParamExists('createVictoriaLogsCluster', 'environmentName', environmentName)
47
+ const localVarPath = `/internal/v1/environments/{environmentName}/victoriaLogsCluster`
48
+ .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)));
49
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
50
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
51
+ let baseOptions;
52
+ if (configuration) {
53
+ baseOptions = configuration.baseOptions;
54
+ }
55
+
56
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
57
+ const localVarHeaderParameter = {} as any;
58
+ const localVarQueryParameter = {} as any;
59
+
60
+ // authentication BasicAuth required
61
+ // http basic authentication required
62
+ setBasicAuthToObject(localVarRequestOptions, configuration)
63
+
64
+
65
+
66
+ localVarHeaderParameter['Content-Type'] = 'application/json';
67
+
68
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
69
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
70
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
71
+ localVarRequestOptions.data = serializeDataIfNeeded(staticCluster, localVarRequestOptions, configuration)
72
+
73
+ return {
74
+ url: toPathString(localVarUrlObj),
75
+ options: localVarRequestOptions,
76
+ };
77
+ },
78
+ }
79
+ };
80
+
81
+ /**
82
+ * VictoriaLogsClusterApi - functional programming interface
83
+ * @export
84
+ */
85
+ export const VictoriaLogsClusterApiFp = function(configuration?: Configuration) {
86
+ const localVarAxiosParamCreator = VictoriaLogsClusterApiAxiosParamCreator(configuration)
87
+ return {
88
+ /**
89
+ * Create VictoriaLogs with optional per-component resources. Omitted components keep installer defaults.
90
+ * @summary Create VictoriaLogs cluster
91
+ * @param {string} environmentName name of the environment
92
+ * @param {StaticCluster} [staticCluster]
93
+ * @param {*} [options] Override http request option.
94
+ * @throws {RequiredError}
95
+ */
96
+ async createVictoriaLogsCluster(environmentName: string, staticCluster?: StaticCluster, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Cluster>> {
97
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createVictoriaLogsCluster(environmentName, staticCluster, options);
98
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
99
+ const localVarOperationServerBasePath = operationServerMap['VictoriaLogsClusterApi.createVictoriaLogsCluster']?.[localVarOperationServerIndex]?.url;
100
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
101
+ },
102
+ }
103
+ };
104
+
105
+ /**
106
+ * VictoriaLogsClusterApi - factory interface
107
+ * @export
108
+ */
109
+ export const VictoriaLogsClusterApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
110
+ const localVarFp = VictoriaLogsClusterApiFp(configuration)
111
+ return {
112
+ /**
113
+ * Create VictoriaLogs with optional per-component resources. Omitted components keep installer defaults.
114
+ * @summary Create VictoriaLogs cluster
115
+ * @param {VictoriaLogsClusterApiCreateVictoriaLogsClusterRequest} requestParameters Request parameters.
116
+ * @param {*} [options] Override http request option.
117
+ * @throws {RequiredError}
118
+ */
119
+ createVictoriaLogsCluster(requestParameters: VictoriaLogsClusterApiCreateVictoriaLogsClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<Cluster> {
120
+ return localVarFp.createVictoriaLogsCluster(requestParameters.environmentName, requestParameters.staticCluster, options).then((request) => request(axios, basePath));
121
+ },
122
+ };
123
+ };
124
+
125
+ /**
126
+ * VictoriaLogsClusterApi - interface
127
+ * @export
128
+ * @interface VictoriaLogsClusterApi
129
+ */
130
+ export interface VictoriaLogsClusterApiInterface {
131
+ /**
132
+ * Create VictoriaLogs with optional per-component resources. Omitted components keep installer defaults.
133
+ * @summary Create VictoriaLogs cluster
134
+ * @param {VictoriaLogsClusterApiCreateVictoriaLogsClusterRequest} requestParameters Request parameters.
135
+ * @param {*} [options] Override http request option.
136
+ * @throws {RequiredError}
137
+ * @memberof VictoriaLogsClusterApiInterface
138
+ */
139
+ createVictoriaLogsCluster(requestParameters: VictoriaLogsClusterApiCreateVictoriaLogsClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<Cluster>;
140
+
141
+ }
142
+
143
+ /**
144
+ * Request parameters for createVictoriaLogsCluster operation in VictoriaLogsClusterApi.
145
+ * @export
146
+ * @interface VictoriaLogsClusterApiCreateVictoriaLogsClusterRequest
147
+ */
148
+ export interface VictoriaLogsClusterApiCreateVictoriaLogsClusterRequest {
149
+ /**
150
+ * name of the environment
151
+ * @type {string}
152
+ * @memberof VictoriaLogsClusterApiCreateVictoriaLogsCluster
153
+ */
154
+ readonly environmentName: string
155
+
156
+ /**
157
+ *
158
+ * @type {StaticCluster}
159
+ * @memberof VictoriaLogsClusterApiCreateVictoriaLogsCluster
160
+ */
161
+ readonly staticCluster?: StaticCluster
162
+ }
163
+
164
+ /**
165
+ * VictoriaLogsClusterApi - object-oriented interface
166
+ * @export
167
+ * @class VictoriaLogsClusterApi
168
+ * @extends {BaseAPI}
169
+ */
170
+ export class VictoriaLogsClusterApi extends BaseAPI implements VictoriaLogsClusterApiInterface {
171
+ /**
172
+ * Create VictoriaLogs with optional per-component resources. Omitted components keep installer defaults.
173
+ * @summary Create VictoriaLogs cluster
174
+ * @param {VictoriaLogsClusterApiCreateVictoriaLogsClusterRequest} requestParameters Request parameters.
175
+ * @param {*} [options] Override http request option.
176
+ * @throws {RequiredError}
177
+ * @memberof VictoriaLogsClusterApi
178
+ */
179
+ public createVictoriaLogsCluster(requestParameters: VictoriaLogsClusterApiCreateVictoriaLogsClusterRequest, options?: RawAxiosRequestConfig) {
180
+ return VictoriaLogsClusterApiFp(this.configuration).createVictoriaLogsCluster(requestParameters.environmentName, requestParameters.staticCluster, options).then((request) => request(this.axios, this.basePath));
181
+ }
182
+ }
183
+
@@ -25,6 +25,8 @@ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError
25
25
  import type { APIErrorResponse } from '../models';
26
26
  // @ts-ignore
27
27
  import type { Cluster } from '../models';
28
+ // @ts-ignore
29
+ import type { StaticCluster } from '../models';
28
30
  /**
29
31
  * VictoriaMetricsClusterApi - axios parameter creator
30
32
  * @export
@@ -35,10 +37,11 @@ export const VictoriaMetricsClusterApiAxiosParamCreator = function (configuratio
35
37
  * create VictoriaMetrics Cluster and install victoria-metrics addon when it\'s uninstalled
36
38
  * @summary create metrics Monitor
37
39
  * @param {string} environmentName name of the environment
40
+ * @param {StaticCluster} [staticCluster] Optional per-component resources. Omitted components keep installer defaults.
38
41
  * @param {*} [options] Override http request option.
39
42
  * @throws {RequiredError}
40
43
  */
41
- createVictoriaMetricsCluster: async (environmentName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
44
+ createVictoriaMetricsCluster: async (environmentName: string, staticCluster?: StaticCluster, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
42
45
  // verify required parameter 'environmentName' is not null or undefined
43
46
  assertParamExists('createVictoriaMetricsCluster', 'environmentName', environmentName)
44
47
  const localVarPath = `/internal/v1/environments/{environmentName}/victoriaMetricsCluster`
@@ -60,9 +63,12 @@ export const VictoriaMetricsClusterApiAxiosParamCreator = function (configuratio
60
63
 
61
64
 
62
65
 
66
+ localVarHeaderParameter['Content-Type'] = 'application/json';
67
+
63
68
  setSearchParams(localVarUrlObj, localVarQueryParameter);
64
69
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
65
70
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
71
+ localVarRequestOptions.data = serializeDataIfNeeded(staticCluster, localVarRequestOptions, configuration)
66
72
 
67
73
  return {
68
74
  url: toPathString(localVarUrlObj),
@@ -83,11 +89,12 @@ export const VictoriaMetricsClusterApiFp = function(configuration?: Configuratio
83
89
  * create VictoriaMetrics Cluster and install victoria-metrics addon when it\'s uninstalled
84
90
  * @summary create metrics Monitor
85
91
  * @param {string} environmentName name of the environment
92
+ * @param {StaticCluster} [staticCluster] Optional per-component resources. Omitted components keep installer defaults.
86
93
  * @param {*} [options] Override http request option.
87
94
  * @throws {RequiredError}
88
95
  */
89
- async createVictoriaMetricsCluster(environmentName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Cluster>> {
90
- const localVarAxiosArgs = await localVarAxiosParamCreator.createVictoriaMetricsCluster(environmentName, options);
96
+ async createVictoriaMetricsCluster(environmentName: string, staticCluster?: StaticCluster, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Cluster>> {
97
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createVictoriaMetricsCluster(environmentName, staticCluster, options);
91
98
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
92
99
  const localVarOperationServerBasePath = operationServerMap['VictoriaMetricsClusterApi.createVictoriaMetricsCluster']?.[localVarOperationServerIndex]?.url;
93
100
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -110,7 +117,7 @@ export const VictoriaMetricsClusterApiFactory = function (configuration?: Config
110
117
  * @throws {RequiredError}
111
118
  */
112
119
  createVictoriaMetricsCluster(requestParameters: VictoriaMetricsClusterApiCreateVictoriaMetricsClusterRequest, options?: RawAxiosRequestConfig): AxiosPromise<Cluster> {
113
- return localVarFp.createVictoriaMetricsCluster(requestParameters.environmentName, options).then((request) => request(axios, basePath));
120
+ return localVarFp.createVictoriaMetricsCluster(requestParameters.environmentName, requestParameters.staticCluster, options).then((request) => request(axios, basePath));
114
121
  },
115
122
  };
116
123
  };
@@ -145,6 +152,13 @@ export interface VictoriaMetricsClusterApiCreateVictoriaMetricsClusterRequest {
145
152
  * @memberof VictoriaMetricsClusterApiCreateVictoriaMetricsCluster
146
153
  */
147
154
  readonly environmentName: string
155
+
156
+ /**
157
+ * Optional per-component resources. Omitted components keep installer defaults.
158
+ * @type {StaticCluster}
159
+ * @memberof VictoriaMetricsClusterApiCreateVictoriaMetricsCluster
160
+ */
161
+ readonly staticCluster?: StaticCluster
148
162
  }
149
163
 
150
164
  /**
@@ -163,7 +177,7 @@ export class VictoriaMetricsClusterApi extends BaseAPI implements VictoriaMetric
163
177
  * @memberof VictoriaMetricsClusterApi
164
178
  */
165
179
  public createVictoriaMetricsCluster(requestParameters: VictoriaMetricsClusterApiCreateVictoriaMetricsClusterRequest, options?: RawAxiosRequestConfig) {
166
- return VictoriaMetricsClusterApiFp(this.configuration).createVictoriaMetricsCluster(requestParameters.environmentName, options).then((request) => request(this.axios, this.basePath));
180
+ return VictoriaMetricsClusterApiFp(this.configuration).createVictoriaMetricsCluster(requestParameters.environmentName, requestParameters.staticCluster, options).then((request) => request(this.axios, this.basePath));
167
181
  }
168
182
  }
169
183
 
@@ -35,6 +35,12 @@ export interface ComponentItem {
35
35
  * @memberof ComponentItem
36
36
  */
37
37
  'annotations'?: { [key: string]: string; };
38
+ /**
39
+ * User-provided component labels. Does not include chart defaults or system-generated values.
40
+ * @type {{ [key: string]: string; }}
41
+ * @memberof ComponentItem
42
+ */
43
+ 'labels'?: { [key: string]: string; };
38
44
  /**
39
45
  * Optional host group in this environment. Explicit placement does not inherit an upper-level host group.
40
46
  * @type {string}
@@ -54,6 +54,7 @@ export * from './scheduling-policy-type';
54
54
  export * from './service-descriptor';
55
55
  export * from './service-ref';
56
56
  export * from './static-cluster';
57
+ export * from './static-cluster-component';
57
58
  export * from './storage';
58
59
  export * from './storage-create';
59
60
  export * from './tag';
@@ -0,0 +1,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KubeBlocks Cloud Internal API
5
+ * The Internal API is using for interaction of ApeCloud platform microservices.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface StaticClusterComponent
21
+ */
22
+ export interface StaticClusterComponent {
23
+ /**
24
+ * Exact component name supported by the selected engine during environment installation. Each component may appear only once.
25
+ * @type {string}
26
+ * @memberof StaticClusterComponent
27
+ */
28
+ 'component': string;
29
+ /**
30
+ * Number of replicas. Omit to keep the installer default.
31
+ * @type {number}
32
+ * @memberof StaticClusterComponent
33
+ */
34
+ 'replicas'?: number | null;
35
+ /**
36
+ * Resource class for this exact engine, mode and component. Omit to keep the installer default.
37
+ * @type {string}
38
+ * @memberof StaticClusterComponent
39
+ */
40
+ 'classCode'?: string;
41
+ /**
42
+ * Disk capacity in Gi. Only vm-storage, vlstorage and minio accept this field.
43
+ * @type {number}
44
+ * @memberof StaticClusterComponent
45
+ */
46
+ 'storage'?: number | null;
47
+ }
48
+
@@ -13,6 +13,9 @@
13
13
  */
14
14
 
15
15
 
16
+ // May contain unused imports in some cases
17
+ // @ts-ignore
18
+ import type { StaticClusterComponent } from './static-cluster-component';
16
19
 
17
20
  /**
18
21
  *
@@ -21,22 +24,10 @@
21
24
  */
22
25
  export interface StaticCluster {
23
26
  /**
24
- * the number of replicas
25
- * @type {number}
27
+ * Optional component overrides. Unknown, duplicate or other-engine components are rejected.
28
+ * @type {Array<StaticClusterComponent>}
26
29
  * @memberof StaticCluster
27
30
  */
28
- 'replicas'?: number;
29
- /**
30
- * Storage size, the unit is Gi.
31
- * @type {number}
32
- * @memberof StaticCluster
33
- */
34
- 'storage'?: number;
35
- /**
36
- *
37
- * @type {string}
38
- * @memberof StaticCluster
39
- */
40
- 'classCode'?: string;
31
+ 'components'?: Array<StaticClusterComponent>;
41
32
  }
42
33