kb-cloud-client-typescript 2.4.0-alpha.66 → 2.4.0-alpha.67

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 (132) hide show
  1. package/dist/adminapi/apis/vip-pool-api.d.ts +72 -0
  2. package/dist/adminapi/apis/vip-pool-api.d.ts.map +1 -1
  3. package/dist/adminapi/apis/vip-pool-api.js +80 -0
  4. package/dist/adminapi/apis/vip-pool-api.js.map +1 -1
  5. package/dist/adminapi/models/cluster-create.d.ts +6 -0
  6. package/dist/adminapi/models/cluster-create.d.ts.map +1 -1
  7. package/dist/adminapi/models/component-item-create.d.ts +8 -1
  8. package/dist/adminapi/models/component-item-create.d.ts.map +1 -1
  9. package/dist/adminapi/models/index.d.ts +8 -0
  10. package/dist/adminapi/models/index.d.ts.map +1 -1
  11. package/dist/adminapi/models/index.js +8 -0
  12. package/dist/adminapi/models/index.js.map +1 -1
  13. package/dist/adminapi/models/instance-template-attribute.d.ts +23 -0
  14. package/dist/adminapi/models/instance-template-attribute.d.ts.map +1 -0
  15. package/dist/adminapi/models/instance-template-attribute.js +27 -0
  16. package/dist/adminapi/models/instance-template-attribute.js.map +1 -0
  17. package/dist/adminapi/models/instance-template-create-env-inner.d.ts +31 -0
  18. package/dist/adminapi/models/instance-template-create-env-inner.d.ts.map +1 -0
  19. package/dist/adminapi/models/instance-template-create-env-inner.js +16 -0
  20. package/dist/adminapi/models/instance-template-create-env-inner.js.map +1 -0
  21. package/dist/adminapi/models/instance-template-create.d.ts +54 -0
  22. package/dist/adminapi/models/instance-template-create.d.ts.map +1 -0
  23. package/dist/adminapi/models/instance-template-create.js +16 -0
  24. package/dist/adminapi/models/instance-template-create.js.map +1 -0
  25. package/dist/adminapi/models/instance-template-env.d.ts +50 -0
  26. package/dist/adminapi/models/instance-template-env.d.ts.map +1 -0
  27. package/dist/adminapi/models/instance-template-env.js +16 -0
  28. package/dist/adminapi/models/instance-template-env.js.map +1 -0
  29. package/dist/adminapi/models/instance-template-op.d.ts +22 -0
  30. package/dist/adminapi/models/instance-template-op.d.ts.map +1 -0
  31. package/dist/adminapi/models/instance-template-op.js +26 -0
  32. package/dist/adminapi/models/instance-template-op.js.map +1 -0
  33. package/dist/adminapi/models/instance-template-replicas.d.ts +31 -0
  34. package/dist/adminapi/models/instance-template-replicas.d.ts.map +1 -0
  35. package/dist/adminapi/models/instance-template-replicas.js +16 -0
  36. package/dist/adminapi/models/instance-template-replicas.js.map +1 -0
  37. package/dist/adminapi/models/mode-component-instance-template.d.ts +46 -0
  38. package/dist/adminapi/models/mode-component-instance-template.d.ts.map +1 -0
  39. package/dist/adminapi/models/mode-component-instance-template.js +16 -0
  40. package/dist/adminapi/models/mode-component-instance-template.js.map +1 -0
  41. package/dist/adminapi/models/mode-component.d.ts +7 -0
  42. package/dist/adminapi/models/mode-component.d.ts.map +1 -1
  43. package/dist/adminapi/models/ops-hscale.d.ts +8 -1
  44. package/dist/adminapi/models/ops-hscale.d.ts.map +1 -1
  45. package/dist/adminapi/models/ops-vscale.d.ts +1 -1
  46. package/dist/adminapi/models/vip-pool-create.d.ts +6 -0
  47. package/dist/adminapi/models/vip-pool-create.d.ts.map +1 -1
  48. package/dist/adminapi/models/vip-pool-update.d.ts +25 -0
  49. package/dist/adminapi/models/vip-pool-update.d.ts.map +1 -0
  50. package/dist/adminapi/models/vip-pool-update.js +16 -0
  51. package/dist/adminapi/models/vip-pool-update.js.map +1 -0
  52. package/dist/adminapi/models/vip-pool.d.ts +12 -0
  53. package/dist/adminapi/models/vip-pool.d.ts.map +1 -1
  54. package/dist/openapi/models/cluster-create.d.ts +6 -0
  55. package/dist/openapi/models/cluster-create.d.ts.map +1 -1
  56. package/dist/openapi/models/component-item-create.d.ts +8 -1
  57. package/dist/openapi/models/component-item-create.d.ts.map +1 -1
  58. package/dist/openapi/models/index.d.ts +7 -0
  59. package/dist/openapi/models/index.d.ts.map +1 -1
  60. package/dist/openapi/models/index.js +7 -0
  61. package/dist/openapi/models/index.js.map +1 -1
  62. package/dist/openapi/models/instance-template-attribute.d.ts +23 -0
  63. package/dist/openapi/models/instance-template-attribute.d.ts.map +1 -0
  64. package/dist/openapi/models/instance-template-attribute.js +27 -0
  65. package/dist/openapi/models/instance-template-attribute.js.map +1 -0
  66. package/dist/openapi/models/instance-template-create-env-inner.d.ts +31 -0
  67. package/dist/openapi/models/instance-template-create-env-inner.d.ts.map +1 -0
  68. package/dist/openapi/models/instance-template-create-env-inner.js +16 -0
  69. package/dist/openapi/models/instance-template-create-env-inner.js.map +1 -0
  70. package/dist/openapi/models/instance-template-create.d.ts +54 -0
  71. package/dist/openapi/models/instance-template-create.d.ts.map +1 -0
  72. package/dist/openapi/models/instance-template-create.js +16 -0
  73. package/dist/openapi/models/instance-template-create.js.map +1 -0
  74. package/dist/openapi/models/instance-template-env.d.ts +50 -0
  75. package/dist/openapi/models/instance-template-env.d.ts.map +1 -0
  76. package/dist/openapi/models/instance-template-env.js +16 -0
  77. package/dist/openapi/models/instance-template-env.js.map +1 -0
  78. package/dist/openapi/models/instance-template-op.d.ts +22 -0
  79. package/dist/openapi/models/instance-template-op.d.ts.map +1 -0
  80. package/dist/openapi/models/instance-template-op.js +26 -0
  81. package/dist/openapi/models/instance-template-op.js.map +1 -0
  82. package/dist/openapi/models/instance-template-replicas.d.ts +31 -0
  83. package/dist/openapi/models/instance-template-replicas.d.ts.map +1 -0
  84. package/dist/openapi/models/instance-template-replicas.js +16 -0
  85. package/dist/openapi/models/instance-template-replicas.js.map +1 -0
  86. package/dist/openapi/models/mode-component-instance-template.d.ts +46 -0
  87. package/dist/openapi/models/mode-component-instance-template.d.ts.map +1 -0
  88. package/dist/openapi/models/mode-component-instance-template.js +16 -0
  89. package/dist/openapi/models/mode-component-instance-template.js.map +1 -0
  90. package/dist/openapi/models/mode-component.d.ts +7 -0
  91. package/dist/openapi/models/mode-component.d.ts.map +1 -1
  92. package/dist/openapi/models/ops-hscale.d.ts +8 -1
  93. package/dist/openapi/models/ops-hscale.d.ts.map +1 -1
  94. package/dist/openapi/models/ops-vscale.d.ts +1 -1
  95. package/dist/openapi/models/vip-pool.d.ts +12 -0
  96. package/dist/openapi/models/vip-pool.d.ts.map +1 -1
  97. package/package.json +1 -1
  98. package/src/adminapi/.openapi-generator/FILES +8 -0
  99. package/src/adminapi/apis/vip-pool-api.ts +128 -0
  100. package/src/adminapi/models/cluster-create.ts +6 -0
  101. package/src/adminapi/models/component-item-create.ts +10 -1
  102. package/src/adminapi/models/index.ts +8 -0
  103. package/src/adminapi/models/instance-template-attribute.ts +32 -0
  104. package/src/adminapi/models/instance-template-create-env-inner.ts +36 -0
  105. package/src/adminapi/models/instance-template-create.ts +57 -0
  106. package/src/adminapi/models/instance-template-env.ts +57 -0
  107. package/src/adminapi/models/instance-template-op.ts +31 -0
  108. package/src/adminapi/models/instance-template-replicas.ts +36 -0
  109. package/src/adminapi/models/mode-component-instance-template.ts +57 -0
  110. package/src/adminapi/models/mode-component.ts +9 -0
  111. package/src/adminapi/models/ops-hscale.ts +10 -1
  112. package/src/adminapi/models/ops-vscale.ts +1 -1
  113. package/src/adminapi/models/vip-pool-create.ts +6 -0
  114. package/src/adminapi/models/vip-pool-update.ts +30 -0
  115. package/src/adminapi/models/vip-pool.ts +12 -0
  116. package/src/adminapi.yaml +228 -3
  117. package/src/openapi/.openapi-generator/FILES +7 -0
  118. package/src/openapi/models/cluster-create.ts +6 -0
  119. package/src/openapi/models/component-item-create.ts +10 -1
  120. package/src/openapi/models/index.ts +7 -0
  121. package/src/openapi/models/instance-template-attribute.ts +32 -0
  122. package/src/openapi/models/instance-template-create-env-inner.ts +36 -0
  123. package/src/openapi/models/instance-template-create.ts +57 -0
  124. package/src/openapi/models/instance-template-env.ts +57 -0
  125. package/src/openapi/models/instance-template-op.ts +31 -0
  126. package/src/openapi/models/instance-template-replicas.ts +36 -0
  127. package/src/openapi/models/mode-component-instance-template.ts +57 -0
  128. package/src/openapi/models/mode-component.ts +9 -0
  129. package/src/openapi/models/ops-hscale.ts +10 -1
  130. package/src/openapi/models/ops-vscale.ts +1 -1
  131. package/src/openapi/models/vip-pool.ts +12 -0
  132. package/src/openapi.yaml +175 -3
@@ -0,0 +1,57 @@
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
+ // May contain unused imports in some cases
17
+ // @ts-ignore
18
+ import type { LocalizedDescription } from './localized-description';
19
+
20
+ /**
21
+ * One fillable env var on an instance template, for frontend rendering.
22
+ * @export
23
+ * @interface InstanceTemplateEnv
24
+ */
25
+ export interface InstanceTemplateEnv {
26
+ /**
27
+ * Env var name written to the instance template.
28
+ * @type {string}
29
+ * @memberof InstanceTemplateEnv
30
+ */
31
+ 'name': string;
32
+ /**
33
+ *
34
+ * @type {LocalizedDescription}
35
+ * @memberof InstanceTemplateEnv
36
+ */
37
+ 'label'?: LocalizedDescription;
38
+ /**
39
+ *
40
+ * @type {LocalizedDescription}
41
+ * @memberof InstanceTemplateEnv
42
+ */
43
+ 'description'?: LocalizedDescription;
44
+ /**
45
+ * If true, the frontend should treat this env as required. Create does not re-check.
46
+ * @type {boolean}
47
+ * @memberof InstanceTemplateEnv
48
+ */
49
+ 'required'?: boolean;
50
+ /**
51
+ * Default value shown by the frontend.
52
+ * @type {string}
53
+ * @memberof InstanceTemplateEnv
54
+ */
55
+ 'default'?: string;
56
+ }
57
+
@@ -0,0 +1,31 @@
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
+ * Operation that can be declared on instanceTemplate.ops.
19
+ * @export
20
+ * @enum {string}
21
+ */
22
+
23
+ export const InstanceTemplateOp = {
24
+ hscale: 'hscale',
25
+ vscale: 'vscale'
26
+ } as const;
27
+
28
+ export type InstanceTemplateOp = typeof InstanceTemplateOp[keyof typeof InstanceTemplateOp];
29
+
30
+
31
+
@@ -0,0 +1,36 @@
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
+ * HScale assignment for one instance template. name and replicas only.
19
+ * @export
20
+ * @interface InstanceTemplateReplicas
21
+ */
22
+ export interface InstanceTemplateReplicas {
23
+ /**
24
+ * Instance template name on the live Cluster spec.
25
+ * @type {string}
26
+ * @memberof InstanceTemplateReplicas
27
+ */
28
+ 'name': string;
29
+ /**
30
+ * Target replica count for this instance template.
31
+ * @type {number}
32
+ * @memberof InstanceTemplateReplicas
33
+ */
34
+ 'replicas': number;
35
+ }
36
+
@@ -0,0 +1,57 @@
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
+ // May contain unused imports in some cases
17
+ // @ts-ignore
18
+ import type { InstanceTemplateAttribute } from './instance-template-attribute';
19
+ // May contain unused imports in some cases
20
+ // @ts-ignore
21
+ import type { InstanceTemplateEnv } from './instance-template-env';
22
+ // May contain unused imports in some cases
23
+ // @ts-ignore
24
+ import type { InstanceTemplateOp } from './instance-template-op';
25
+
26
+ /**
27
+ * Frontend catalog of instance templates for this mode component. names, ops, attributes, and env are for UI rendering. Create validates the request against chart-rendered Cluster instances, not this catalog. HScale does not re-check this catalog; it builds the OpsRequest from the request and the live Cluster. HScale instanceTemplates still requires top-level replicas. ops lists hscale and vscale for the UI (vscale is reserved; class stays component-level). Only HScale processes instance templates. VolumeExpansion, VScale, Upgrade, Restart, and other operations silently ignore instance templates and keep their component-level behavior. Template-level volumeexpansion is not implemented. The platform does not even-split or fill in missing templates. When absent, the frontend should use component-level operations.
28
+ * @export
29
+ * @interface ModeComponentInstanceTemplate
30
+ */
31
+ export interface ModeComponentInstanceTemplate {
32
+ /**
33
+ * Instance template names the frontend should render. Create and hscale check names against the chart or live Cluster, not this list.
34
+ * @type {Set<string>}
35
+ * @memberof ModeComponentInstanceTemplate
36
+ */
37
+ 'names': Set<string>;
38
+ /**
39
+ * Operations the frontend should offer per template: hscale, vscale. Not re-checked when creating a cluster or building an hscale OpsRequest. Only hscale currently acts per template; vscale is reserved. VolumeExpansion, VScale, Upgrade, and Restart ignore instance templates and keep their component-level behavior.
40
+ * @type {Array<InstanceTemplateOp>}
41
+ * @memberof ModeComponentInstanceTemplate
42
+ */
43
+ 'ops': Array<InstanceTemplateOp>;
44
+ /**
45
+ * Heterogeneous attributes the frontend should render on each instance template at create. Omitted or empty means only name and replicas. Create overlays the request onto the chart and does not re-check this list.
46
+ * @type {Set<InstanceTemplateAttribute>}
47
+ * @memberof ModeComponentInstanceTemplate
48
+ */
49
+ 'attributes'?: Set<InstanceTemplateAttribute>;
50
+ /**
51
+ * Env vars the frontend may render when attributes includes env. Create does not re-check this list.
52
+ * @type {Array<InstanceTemplateEnv>}
53
+ * @memberof ModeComponentInstanceTemplate
54
+ */
55
+ 'env'?: Array<InstanceTemplateEnv>;
56
+ }
57
+
@@ -13,6 +13,9 @@
13
13
  */
14
14
 
15
15
 
16
+ // May contain unused imports in some cases
17
+ // @ts-ignore
18
+ import type { ModeComponentInstanceTemplate } from './mode-component-instance-template';
16
19
  // May contain unused imports in some cases
17
20
  // @ts-ignore
18
21
  import type { ModeReadonlyEndpoint } from './mode-readonly-endpoint';
@@ -41,6 +44,12 @@ export interface ModeComponent {
41
44
  * @memberof ModeComponent
42
45
  */
43
46
  'hideOnCreate': boolean;
47
+ /**
48
+ *
49
+ * @type {ModeComponentInstanceTemplate}
50
+ * @memberof ModeComponent
51
+ */
52
+ 'instanceTemplate'?: ModeComponentInstanceTemplate;
44
53
  /**
45
54
  * the name of the serviceRef defined in mode\'s serviceRefs. If set, it means a serviceRef can be used to replace this component.
46
55
  * @type {string}
@@ -13,12 +13,15 @@
13
13
  */
14
14
 
15
15
 
16
+ // May contain unused imports in some cases
17
+ // @ts-ignore
18
+ import type { InstanceTemplateReplicas } from './instance-template-replicas';
16
19
  // May contain unused imports in some cases
17
20
  // @ts-ignore
18
21
  import type { TaskSchedule } from './task-schedule';
19
22
 
20
23
  /**
21
- * OpsHScale is the payload to horizontally scale a KubeBlocks cluster. It requires specifying either the number of replicas or the number of shards.
24
+ * OpsHScale is the payload to horizontally scale a KubeBlocks cluster. Specify replicas or shards. instanceTemplates is an optional overlay and requires top-level replicas.
22
25
  * @export
23
26
  * @interface OpsHScale
24
27
  */
@@ -41,6 +44,12 @@ export interface OpsHScale {
41
44
  * @memberof OpsHScale
42
45
  */
43
46
  'replicas'?: number | null;
47
+ /**
48
+ * Target replica count for named instance templates. Requires top-level replicas. Mapped onto the live Cluster spec to build scaleIn/scaleOut.instances. Required for replica scaling when the live component has instance templates. Names must exactly match all live instance templates, without missing, extra, or duplicate names; order does not matter. Top-level replicas must equal the sum of all requested template replica counts. Shard-count scaling does not check templates and cannot include this list.
49
+ * @type {Array<InstanceTemplateReplicas>}
50
+ * @memberof OpsHScale
51
+ */
52
+ 'instanceTemplates'?: Array<InstanceTemplateReplicas>;
44
53
  /**
45
54
  * List of online instance names to be switched to offline during scaling in.
46
55
  * @type {Array<string>}
@@ -42,7 +42,7 @@ export interface OpsVScale {
42
42
  */
43
43
  'memory'?: string;
44
44
  /**
45
- * class code of the cluster
45
+ * Class code for component-level vertical scaling.
46
46
  * @type {string}
47
47
  * @memberof OpsVScale
48
48
  */
@@ -26,5 +26,11 @@ export interface VipPoolCreate {
26
26
  * @memberof VipPoolCreate
27
27
  */
28
28
  'addresses': string;
29
+ /**
30
+ * Name of the VIP Pool. It is what a cluster selects the pool by, so it is not restricted by Kubernetes resource naming rules. The MetalLB IPAddressPool resource name stays the generated kb-<id>.
31
+ * @type {string}
32
+ * @memberof VipPoolCreate
33
+ */
34
+ 'poolName': string;
29
35
  }
30
36
 
@@ -0,0 +1,30 @@
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
+ * VIP Pool update
19
+ * @export
20
+ * @interface VipPoolUpdate
21
+ */
22
+ export interface VipPoolUpdate {
23
+ /**
24
+ * IP Addresses
25
+ * @type {string}
26
+ * @memberof VipPoolUpdate
27
+ */
28
+ 'addresses': string;
29
+ }
30
+
@@ -32,6 +32,18 @@ export interface VipPool {
32
32
  * @memberof VipPool
33
33
  */
34
34
  'id'?: string;
35
+ /**
36
+ * Name of VIP Pool. It is the MetalLB IPAddressPool resource name, generated as kb-<id>.
37
+ * @type {string}
38
+ * @memberof VipPool
39
+ */
40
+ 'name'?: string;
41
+ /**
42
+ * User facing name of the VIP Pool, used to select the pool when creating a cluster. It falls back to the IPAddressPool resource name.
43
+ * @type {string}
44
+ * @memberof VipPool
45
+ */
46
+ 'poolName'?: string;
35
47
  /**
36
48
  * Total number of IP addresses
37
49
  * @type {number}
package/src/adminapi.yaml CHANGED
@@ -11407,6 +11407,44 @@ paths:
11407
11407
  $ref: '#/components/responses/404'
11408
11408
  tags:
11409
11409
  - vipPool
11410
+ put:
11411
+ operationId: updateVIPPool
11412
+ summary: Update environment VIP Pool
11413
+ parameters:
11414
+ - description: name of the environment
11415
+ in: path
11416
+ name: environmentName
11417
+ required: true
11418
+ schema:
11419
+ type: string
11420
+ - description: id of the VIP Pool
11421
+ in: path
11422
+ name: poolID
11423
+ required: true
11424
+ schema:
11425
+ type: string
11426
+ requestBody:
11427
+ content:
11428
+ application/json:
11429
+ schema:
11430
+ $ref: '#/components/schemas/vipPoolUpdate'
11431
+ required: true
11432
+ responses:
11433
+ '200':
11434
+ content:
11435
+ application/json:
11436
+ schema:
11437
+ $ref: '#/components/schemas/vipPool'
11438
+ description: A successful response.
11439
+ '400':
11440
+ $ref: '#/components/responses/400'
11441
+ '403':
11442
+ $ref: '#/components/responses/403'
11443
+ '404':
11444
+ $ref: '#/components/responses/404'
11445
+ tags:
11446
+ - vipPool
11447
+ x-codegen-request-body-name: body
11410
11448
  /admin/v1/environments/{environmentName}/storageClasses:
11411
11449
  get:
11412
11450
  description: Provides a summary of storage class statistics.
@@ -30107,6 +30145,48 @@ components:
30107
30145
  enum:
30108
30146
  - DoNotTerminate
30109
30147
  - Delete
30148
+ instanceTemplateCreate:
30149
+ type: object
30150
+ additionalProperties: false
30151
+ description: |
30152
+ Create assignment for one instance template. name and replicas are required. env, annotations, and labels are optional overlays onto the chart-rendered instance. The request must include every chart-rendered instance template exactly once.
30153
+ required:
30154
+ - name
30155
+ - replicas
30156
+ properties:
30157
+ name:
30158
+ type: string
30159
+ minLength: 1
30160
+ description: Instance template name; must match a chart-rendered instance.
30161
+ replicas:
30162
+ type: integer
30163
+ minimum: 0
30164
+ description: Replica count for this instance template.
30165
+ env:
30166
+ type: array
30167
+ description: Simple env vars (name and value only) merged into this template. valueFrom is not supported; overlaying a name clears any chart valueFrom.
30168
+ items:
30169
+ type: object
30170
+ required:
30171
+ - name
30172
+ - value
30173
+ properties:
30174
+ name:
30175
+ type: string
30176
+ value:
30177
+ type: string
30178
+ minLength: 1
30179
+ description: Plain string value only. valueFrom is not supported.
30180
+ annotations:
30181
+ type: object
30182
+ additionalProperties:
30183
+ type: string
30184
+ description: Annotation map (string key to string value). Merged into this template; same-name keys overwritten. Chart keys are not deleted.
30185
+ labels:
30186
+ type: object
30187
+ additionalProperties:
30188
+ type: string
30189
+ description: Label map (string key to string value). Merged into this template; same-name keys overwritten. Chart keys are not deleted.
30110
30190
  ioQuantity:
30111
30191
  description: IO Quantity describes IOPS and BPS of a volume
30112
30192
  properties:
@@ -30190,7 +30270,13 @@ components:
30190
30270
  title: Replicas
30191
30271
  type: integer
30192
30272
  x-nullable: true
30193
- description: Omit to use the cluster chart default. Set zero to disable the component when its resource constraints allow zero replicas.
30273
+ description: Omit to use the cluster chart default. Set zero to disable the component when its resource constraints allow zero replicas. If the rendered component has instance templates, this must equal the sum of all template replica counts in the complete instanceTemplates list.
30274
+ instanceTemplates:
30275
+ type: array
30276
+ minItems: 1
30277
+ description: Per-template replicas and optional overlays (env, annotations, labels). Required when the chart renders instance templates. Names must exactly match all chart-rendered instances, without missing, extra, or duplicate names; order does not matter. Component replicas must equal the sum of all requested instance template replica counts.
30278
+ items:
30279
+ $ref: '#/components/schemas/instanceTemplateCreate'
30194
30280
  skipResourceConstraints:
30195
30281
  type: boolean
30196
30282
  description: Whether to skip resource constraint validation when creating cluster
@@ -30484,6 +30570,10 @@ components:
30484
30570
  networkMode:
30485
30571
  description: Specify the network mode for intra-cluster communication
30486
30572
  $ref: '#/components/schemas/networkMode'
30573
+ vipPoolName:
30574
+ title: VIP Pool Name
30575
+ description: Name of the VIP Pool (VIP Pool poolName) used as the MetalLB address pool for LoadBalancer services. Only effective when networkMode is LoadBalancer.
30576
+ type: string
30487
30577
  serviceRefs:
30488
30578
  type: array
30489
30579
  items:
@@ -31561,8 +31651,23 @@ components:
31561
31651
  x-nullable: true
31562
31652
  required:
31563
31653
  - type
31654
+ instanceTemplateReplicas:
31655
+ type: object
31656
+ description: HScale assignment for one instance template. name and replicas only.
31657
+ required:
31658
+ - name
31659
+ - replicas
31660
+ properties:
31661
+ name:
31662
+ type: string
31663
+ minLength: 1
31664
+ description: Instance template name on the live Cluster spec.
31665
+ replicas:
31666
+ type: integer
31667
+ minimum: 0
31668
+ description: Target replica count for this instance template.
31564
31669
  opsHScale:
31565
- description: OpsHScale is the payload to horizontally scale a KubeBlocks cluster. It requires specifying either the number of replicas or the number of shards.
31670
+ description: OpsHScale is the payload to horizontally scale a KubeBlocks cluster. Specify replicas or shards. instanceTemplates is an optional overlay and requires top-level replicas.
31566
31671
  required:
31567
31672
  - component
31568
31673
  properties:
@@ -31578,6 +31683,12 @@ components:
31578
31683
  description: number of replicas
31579
31684
  type: integer
31580
31685
  nullable: true
31686
+ instanceTemplates:
31687
+ type: array
31688
+ minItems: 1
31689
+ description: Target replica count for named instance templates. Requires top-level replicas. Mapped onto the live Cluster spec to build scaleIn/scaleOut.instances. Required for replica scaling when the live component has instance templates. Names must exactly match all live instance templates, without missing, extra, or duplicate names; order does not matter. Top-level replicas must equal the sum of all requested template replica counts. Shard-count scaling does not check templates and cannot include this list.
31690
+ items:
31691
+ $ref: '#/components/schemas/instanceTemplateReplicas'
31581
31692
  onlineInstancesToOffline:
31582
31693
  type: array
31583
31694
  items:
@@ -35620,7 +35731,7 @@ components:
35620
35731
  description: memory size
35621
35732
  type: string
35622
35733
  classCode:
35623
- description: class code of the cluster
35734
+ description: Class code for component-level vertical scaling.
35624
35735
  type: string
35625
35736
  schedule:
35626
35737
  $ref: '#/components/schemas/taskSchedule'
@@ -37226,6 +37337,14 @@ components:
37226
37337
  description: ID of VIP Pool
37227
37338
  title: ID
37228
37339
  type: string
37340
+ name:
37341
+ description: Name of VIP Pool. It is the MetalLB IPAddressPool resource name, generated as kb-<id>.
37342
+ title: Name
37343
+ type: string
37344
+ poolName:
37345
+ description: User facing name of the VIP Pool, used to select the pool when creating a cluster. It falls back to the IPAddressPool resource name.
37346
+ title: Pool Name
37347
+ type: string
37229
37348
  total:
37230
37349
  description: Total number of IP addresses
37231
37350
  format: int64
@@ -37262,6 +37381,21 @@ components:
37262
37381
  type: object
37263
37382
  vipPoolCreate:
37264
37383
  description: VIP Pool create
37384
+ properties:
37385
+ addresses:
37386
+ description: IP Addresses
37387
+ title: IP Addresses
37388
+ type: string
37389
+ poolName:
37390
+ description: Name of the VIP Pool. It is what a cluster selects the pool by, so it is not restricted by Kubernetes resource naming rules. The MetalLB IPAddressPool resource name stays the generated kb-<id>.
37391
+ title: Pool Name
37392
+ type: string
37393
+ required:
37394
+ - addresses
37395
+ - poolName
37396
+ type: object
37397
+ vipPoolUpdate:
37398
+ description: VIP Pool update
37265
37399
  properties:
37266
37400
  addresses:
37267
37401
  description: IP Addresses
@@ -39298,6 +39432,39 @@ components:
39298
39432
  enum:
39299
39433
  - '0.9'
39300
39434
  - '1.0'
39435
+ instanceTemplateOp:
39436
+ type: string
39437
+ description: Operation that can be declared on instanceTemplate.ops.
39438
+ enum:
39439
+ - hscale
39440
+ - vscale
39441
+ instanceTemplateAttribute:
39442
+ type: string
39443
+ description: Heterogeneous attribute the frontend may render on an instance template at create.
39444
+ enum:
39445
+ - env
39446
+ - annotations
39447
+ - labels
39448
+ instanceTemplateEnv:
39449
+ type: object
39450
+ description: One fillable env var on an instance template, for frontend rendering.
39451
+ required:
39452
+ - name
39453
+ properties:
39454
+ name:
39455
+ type: string
39456
+ minLength: 1
39457
+ description: Env var name written to the instance template.
39458
+ label:
39459
+ $ref: '#/components/schemas/localizedDescription'
39460
+ description:
39461
+ $ref: '#/components/schemas/localizedDescription'
39462
+ required:
39463
+ type: boolean
39464
+ description: If true, the frontend should treat this env as required. Create does not re-check.
39465
+ default:
39466
+ type: string
39467
+ description: Default value shown by the frontend.
39301
39468
  modeReadonlyEndpoint:
39302
39469
  type: object
39303
39470
  required:
@@ -39319,6 +39486,64 @@ components:
39319
39486
  type: boolean
39320
39487
  hideOnCreate:
39321
39488
  type: boolean
39489
+ instanceTemplate:
39490
+ type: object
39491
+ description: |
39492
+ Frontend catalog of instance templates for this mode component.
39493
+ names, ops, attributes, and env are for UI rendering. Create
39494
+ validates the request against chart-rendered Cluster instances,
39495
+ not this catalog. HScale does not re-check this catalog; it
39496
+ builds the OpsRequest from the request and the live Cluster.
39497
+ HScale instanceTemplates still requires top-level replicas.
39498
+ ops lists hscale and vscale for the UI (vscale is reserved;
39499
+ class stays component-level). Only HScale processes instance templates.
39500
+ VolumeExpansion, VScale, Upgrade, Restart, and other operations silently
39501
+ ignore instance templates and keep their component-level behavior.
39502
+ Template-level volumeexpansion is not implemented.
39503
+ The platform does not even-split or fill in missing templates.
39504
+ When absent, the frontend should use component-level operations.
39505
+ required:
39506
+ - names
39507
+ - ops
39508
+ properties:
39509
+ names:
39510
+ type: array
39511
+ minItems: 1
39512
+ uniqueItems: true
39513
+ items:
39514
+ type: string
39515
+ description: |
39516
+ Instance template names the frontend should render.
39517
+ Create and hscale check names against the chart or live Cluster,
39518
+ not this list.
39519
+ ops:
39520
+ type: array
39521
+ minItems: 1
39522
+ items:
39523
+ $ref: '#/components/schemas/instanceTemplateOp'
39524
+ description: |
39525
+ Operations the frontend should offer per template: hscale, vscale.
39526
+ Not re-checked when creating a cluster or building an hscale OpsRequest.
39527
+ Only hscale currently acts per template; vscale is reserved.
39528
+ VolumeExpansion, VScale, Upgrade, and Restart ignore instance templates
39529
+ and keep their component-level behavior.
39530
+ attributes:
39531
+ type: array
39532
+ uniqueItems: true
39533
+ items:
39534
+ $ref: '#/components/schemas/instanceTemplateAttribute'
39535
+ description: |
39536
+ Heterogeneous attributes the frontend should render on each
39537
+ instance template at create. Omitted or empty means only name
39538
+ and replicas. Create overlays the request onto the chart and
39539
+ does not re-check this list.
39540
+ env:
39541
+ type: array
39542
+ description: |
39543
+ Env vars the frontend may render when attributes includes env.
39544
+ Create does not re-check this list.
39545
+ items:
39546
+ $ref: '#/components/schemas/instanceTemplateEnv'
39322
39547
  serviceRef:
39323
39548
  type: string
39324
39549
  description: |
@@ -604,6 +604,12 @@ models/instance-metrics-list.ts
604
604
  models/instance-metrics.ts
605
605
  models/instance-status.ts
606
606
  models/instance-storage-item.ts
607
+ models/instance-template-attribute.ts
608
+ models/instance-template-create-env-inner.ts
609
+ models/instance-template-create.ts
610
+ models/instance-template-env.ts
611
+ models/instance-template-op.ts
612
+ models/instance-template-replicas.ts
607
613
  models/instance.ts
608
614
  models/integer-option.ts
609
615
  models/international-desc.ts
@@ -666,6 +672,7 @@ models/milvus-role-list.ts
666
672
  models/milvus-role-request.ts
667
673
  models/milvus-role.ts
668
674
  models/mode-compatible-kubeblocks-version.ts
675
+ models/mode-component-instance-template.ts
669
676
  models/mode-component.ts
670
677
  models/mode-object-storage-additional-helm-value-path.ts
671
678
  models/mode-object-storage-service-ref.ts
@@ -191,6 +191,12 @@ export interface ClusterCreate {
191
191
  * @memberof ClusterCreate
192
192
  */
193
193
  'networkMode'?: NetworkMode;
194
+ /**
195
+ * Name of the VIP Pool (VIP Pool poolName) used as the MetalLB address pool for LoadBalancer services. Only effective when networkMode is LoadBalancer.
196
+ * @type {string}
197
+ * @memberof ClusterCreate
198
+ */
199
+ 'vipPoolName'?: string;
194
200
  /**
195
201
  *
196
202
  * @type {Array<ServiceRef>}
@@ -19,6 +19,9 @@ import type { ComponentNetwork } from './component-network';
19
19
  // May contain unused imports in some cases
20
20
  // @ts-ignore
21
21
  import type { ComponentVolumeItem } from './component-volume-item';
22
+ // May contain unused imports in some cases
23
+ // @ts-ignore
24
+ import type { InstanceTemplateCreate } from './instance-template-create';
22
25
 
23
26
  /**
24
27
  * ComponentItem is the information of a component
@@ -39,11 +42,17 @@ export interface ComponentItemCreate {
39
42
  */
40
43
  'compNum'?: number;
41
44
  /**
42
- * Omit to use the cluster chart default. Set zero to disable the component when its resource constraints allow zero replicas.
45
+ * Omit to use the cluster chart default. Set zero to disable the component when its resource constraints allow zero replicas. If the rendered component has instance templates, this must equal the sum of all template replica counts in the complete instanceTemplates list.
43
46
  * @type {number}
44
47
  * @memberof ComponentItemCreate
45
48
  */
46
49
  'replicas'?: number | null;
50
+ /**
51
+ * Per-template replicas and optional overlays (env, annotations, labels). Required when the chart renders instance templates. Names must exactly match all chart-rendered instances, without missing, extra, or duplicate names; order does not matter. Component replicas must equal the sum of all requested instance template replica counts.
52
+ * @type {Array<InstanceTemplateCreate>}
53
+ * @memberof ComponentItemCreate
54
+ */
55
+ 'instanceTemplates'?: Array<InstanceTemplateCreate>;
47
56
  /**
48
57
  * Whether to skip resource constraint validation when creating cluster
49
58
  * @type {boolean}