kb-cloud-client-typescript 2.4.0-alpha.70 → 2.4.0-alpha.71

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 (75) hide show
  1. package/dist/adminapi/models/index.d.ts +2 -1
  2. package/dist/adminapi/models/index.d.ts.map +1 -1
  3. package/dist/adminapi/models/index.js +2 -1
  4. package/dist/adminapi/models/index.js.map +1 -1
  5. package/dist/adminapi/models/instance-template-attribute.d.ts +2 -0
  6. package/dist/adminapi/models/instance-template-attribute.d.ts.map +1 -1
  7. package/dist/adminapi/models/instance-template-attribute.js +3 -1
  8. package/dist/adminapi/models/instance-template-attribute.js.map +1 -1
  9. package/dist/adminapi/models/instance-template-create.d.ts +13 -1
  10. package/dist/adminapi/models/instance-template-create.d.ts.map +1 -1
  11. package/dist/adminapi/models/instance-template-op.d.ts +1 -0
  12. package/dist/adminapi/models/instance-template-op.d.ts.map +1 -1
  13. package/dist/adminapi/models/instance-template-op.js +2 -1
  14. package/dist/adminapi/models/instance-template-op.js.map +1 -1
  15. package/dist/adminapi/models/instance-template-volume-expand.d.ts +32 -0
  16. package/dist/adminapi/models/instance-template-volume-expand.d.ts.map +1 -0
  17. package/dist/adminapi/models/{ops-volume-expand-volumes-inner.js → instance-template-volume-expand.js} +1 -1
  18. package/dist/adminapi/models/instance-template-volume-expand.js.map +1 -0
  19. package/dist/adminapi/models/mode-component-instance-template.d.ts +3 -3
  20. package/dist/adminapi/models/{ops-volume-expand-volumes-inner.d.ts → ops-volume-expand-volumes-items0.d.ts} +7 -7
  21. package/dist/adminapi/models/ops-volume-expand-volumes-items0.d.ts.map +1 -0
  22. package/dist/adminapi/models/ops-volume-expand-volumes-items0.js +16 -0
  23. package/dist/adminapi/models/ops-volume-expand-volumes-items0.js.map +1 -0
  24. package/dist/adminapi/models/ops-volume-expand.d.ts +11 -4
  25. package/dist/adminapi/models/ops-volume-expand.d.ts.map +1 -1
  26. package/dist/openapi/models/index.d.ts +2 -1
  27. package/dist/openapi/models/index.d.ts.map +1 -1
  28. package/dist/openapi/models/index.js +2 -1
  29. package/dist/openapi/models/index.js.map +1 -1
  30. package/dist/openapi/models/instance-template-attribute.d.ts +2 -0
  31. package/dist/openapi/models/instance-template-attribute.d.ts.map +1 -1
  32. package/dist/openapi/models/instance-template-attribute.js +3 -1
  33. package/dist/openapi/models/instance-template-attribute.js.map +1 -1
  34. package/dist/openapi/models/instance-template-create.d.ts +13 -1
  35. package/dist/openapi/models/instance-template-create.d.ts.map +1 -1
  36. package/dist/openapi/models/instance-template-op.d.ts +1 -0
  37. package/dist/openapi/models/instance-template-op.d.ts.map +1 -1
  38. package/dist/openapi/models/instance-template-op.js +2 -1
  39. package/dist/openapi/models/instance-template-op.js.map +1 -1
  40. package/dist/openapi/models/instance-template-volume-expand.d.ts +32 -0
  41. package/dist/openapi/models/instance-template-volume-expand.d.ts.map +1 -0
  42. package/dist/openapi/models/{ops-volume-expand-volumes-inner.js → instance-template-volume-expand.js} +1 -1
  43. package/dist/openapi/models/instance-template-volume-expand.js.map +1 -0
  44. package/dist/openapi/models/mode-component-instance-template.d.ts +3 -3
  45. package/dist/openapi/models/{ops-volume-expand-volumes-inner.d.ts → ops-volume-expand-volumes-items0.d.ts} +7 -7
  46. package/dist/openapi/models/ops-volume-expand-volumes-items0.d.ts.map +1 -0
  47. package/dist/openapi/models/ops-volume-expand-volumes-items0.js +16 -0
  48. package/dist/openapi/models/ops-volume-expand-volumes-items0.js.map +1 -0
  49. package/dist/openapi/models/ops-volume-expand.d.ts +11 -4
  50. package/dist/openapi/models/ops-volume-expand.d.ts.map +1 -1
  51. package/package.json +1 -1
  52. package/src/adminapi/.openapi-generator/FILES +2 -1
  53. package/src/adminapi/models/index.ts +2 -1
  54. package/src/adminapi/models/instance-template-attribute.ts +3 -1
  55. package/src/adminapi/models/instance-template-create.ts +13 -1
  56. package/src/adminapi/models/instance-template-op.ts +2 -1
  57. package/src/adminapi/models/instance-template-volume-expand.ts +39 -0
  58. package/src/adminapi/models/mode-component-instance-template.ts +3 -3
  59. package/src/adminapi/models/{ops-volume-expand-volumes-inner.ts → ops-volume-expand-volumes-items0.ts} +6 -6
  60. package/src/adminapi/models/ops-volume-expand.ts +13 -4
  61. package/src/adminapi.yaml +53 -32
  62. package/src/openapi/.openapi-generator/FILES +2 -1
  63. package/src/openapi/models/index.ts +2 -1
  64. package/src/openapi/models/instance-template-attribute.ts +3 -1
  65. package/src/openapi/models/instance-template-create.ts +13 -1
  66. package/src/openapi/models/instance-template-op.ts +2 -1
  67. package/src/openapi/models/instance-template-volume-expand.ts +39 -0
  68. package/src/openapi/models/mode-component-instance-template.ts +3 -3
  69. package/src/openapi/models/{ops-volume-expand-volumes-inner.ts → ops-volume-expand-volumes-items0.ts} +6 -6
  70. package/src/openapi/models/ops-volume-expand.ts +13 -4
  71. package/src/openapi.yaml +53 -32
  72. package/dist/adminapi/models/ops-volume-expand-volumes-inner.d.ts.map +0 -1
  73. package/dist/adminapi/models/ops-volume-expand-volumes-inner.js.map +0 -1
  74. package/dist/openapi/models/ops-volume-expand-volumes-inner.d.ts.map +0 -1
  75. package/dist/openapi/models/ops-volume-expand-volumes-inner.js.map +0 -1
@@ -24,19 +24,19 @@ import type { InstanceTemplateEnv } from './instance-template-env';
24
24
  import type { InstanceTemplateOp } from './instance-template-op';
25
25
 
26
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.
27
+ * Template fields and operations shared by the frontend and backend. Declaring storageExpansion in ops requires explicit volume expansion targets for every name. Components without this capability use component-level expansion.
28
28
  * @export
29
29
  * @interface ModeComponentInstanceTemplate
30
30
  */
31
31
  export interface ModeComponentInstanceTemplate {
32
32
  /**
33
- * Instance template names the frontend should render. Create and hscale check names against the chart or live Cluster, not this list.
33
+ * Instance template names the frontend should render. Create and hscale check names against the chart or live Cluster, not this list. Explicit volume expansion targets must include every name in this list.
34
34
  * @type {Set<string>}
35
35
  * @memberof ModeComponentInstanceTemplate
36
36
  */
37
37
  'names': Set<string>;
38
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.
39
+ * Template operations: hscale, storageExpansion, and reserved vscale. Explicit volume expansion targets must match component volume names and target capacities.
40
40
  * @type {Array<InstanceTemplateOp>}
41
41
  * @memberof ModeComponentInstanceTemplate
42
42
  */
@@ -17,19 +17,19 @@
17
17
  /**
18
18
  *
19
19
  * @export
20
- * @interface OpsVolumeExpandVolumesInner
20
+ * @interface OpsVolumeExpandVolumesItems0
21
21
  */
22
- export interface OpsVolumeExpandVolumesInner {
22
+ export interface OpsVolumeExpandVolumesItems0 {
23
23
  /**
24
- * volume name
24
+ * Volume name.
25
25
  * @type {string}
26
- * @memberof OpsVolumeExpandVolumesInner
26
+ * @memberof OpsVolumeExpandVolumesItems0
27
27
  */
28
28
  'name': string;
29
29
  /**
30
- * Storage size, the unit is Gi.
30
+ * Desired size with Gi suffix, for example 30Gi.
31
31
  * @type {string}
32
- * @memberof OpsVolumeExpandVolumesInner
32
+ * @memberof OpsVolumeExpandVolumesItems0
33
33
  */
34
34
  'storage': string;
35
35
  }
@@ -15,14 +15,23 @@
15
15
 
16
16
  // May contain unused imports in some cases
17
17
  // @ts-ignore
18
- import type { OpsVolumeExpandVolumesInner } from './ops-volume-expand-volumes-inner';
18
+ import type { InstanceTemplateVolumeExpand } from './instance-template-volume-expand';
19
+ // May contain unused imports in some cases
20
+ // @ts-ignore
21
+ import type { OpsVolumeExpandVolumesItems0 } from './ops-volume-expand-volumes-items0';
19
22
 
20
23
  /**
21
- * OpsVolumeExpand is the payload to expand volume for a KubeBlocks cluster
24
+ * Expand component volumes and explicit targets for components with template expansion enabled.
22
25
  * @export
23
26
  * @interface OpsVolumeExpand
24
27
  */
25
28
  export interface OpsVolumeExpand {
29
+ /**
30
+ * Required when the current mode component instanceTemplate.ops includes storageExpansion; otherwise omit for component-level expansion. Explicit targets require this capability. Every configured template must explicitly specify the same volume names and target capacities as component-level volumes. Names identify templates, not Pods. Targets are forwarded together in one OpsRequest without filling in, merging, or removing template targets. KubeBlocks may materialize template volumeClaimTemplates for explicitly targeted inherited volumes.
31
+ * @type {Array<InstanceTemplateVolumeExpand>}
32
+ * @memberof OpsVolumeExpand
33
+ */
34
+ 'instanceTemplates'?: Array<InstanceTemplateVolumeExpand>;
26
35
  /**
27
36
  *
28
37
  * @type {string}
@@ -31,9 +40,9 @@ export interface OpsVolumeExpand {
31
40
  'component': string;
32
41
  /**
33
42
  *
34
- * @type {Array<OpsVolumeExpandVolumesInner>}
43
+ * @type {Array<OpsVolumeExpandVolumesItems0>}
35
44
  * @memberof OpsVolumeExpand
36
45
  */
37
- 'volumes': Array<OpsVolumeExpandVolumesInner>;
46
+ 'volumes': Array<OpsVolumeExpandVolumesItems0>;
38
47
  }
39
48
 
package/src/adminapi.yaml CHANGED
@@ -30114,7 +30114,7 @@ components:
30114
30114
  type: object
30115
30115
  additionalProperties: false
30116
30116
  description: |
30117
- 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.
30117
+ Create assignment for one instance template. name and replicas are required. env, annotations, labels, availabilityZone, and storageClass are optional overlays onto the chart-rendered instance. The request must include every chart-rendered instance template exactly once. A template with an explicit zone uses single-zone scheduling: hostname anti-affinity follows the scheduling policy, while explicit rules and additional topology keys are preserved. Component scheduling remains unchanged; templates without a zone inherit it, including its zone anti-affinity constraints. Chart instance scheduling policies are cleared; an omitted or empty availabilityZone leaves the instance policy unset to inherit the component policy.
30118
30118
  required:
30119
30119
  - name
30120
30120
  - replicas
@@ -30127,6 +30127,12 @@ components:
30127
30127
  type: integer
30128
30128
  minimum: 0
30129
30129
  description: Replica count for this instance template.
30130
+ availabilityZone:
30131
+ type: string
30132
+ description: Availability zone for this template (topology.kubernetes.io/zone); omitted or empty inherits the component zone selection. Must be enabled in the environment. If the request explicitly supplies a non-empty cluster availabilityZones list, the template zone must also belong to that list.
30133
+ storageClass:
30134
+ type: string
30135
+ description: StorageClass name for all persistent volumes in this template. Copied from component volumeClaimTemplates, preserving volume sizes and other settings while overriding storageClassName. Chart instance volume templates are cleared; omitted or empty leaves instance volumeClaimTemplates unset.
30130
30136
  env:
30131
30137
  type: array
30132
30138
  description: Simple env vars (name and value only) merged into this template. valueFrom is not supported; overlaying a name clears any chart valueFrom.
@@ -35694,9 +35700,43 @@ components:
35694
35700
  type: array
35695
35701
  items:
35696
35702
  $ref: '#/components/schemas/engineServiceVersionsItem'
35703
+ opsVolumeExpandVolumesItems0:
35704
+ type: object
35705
+ required:
35706
+ - name
35707
+ - storage
35708
+ properties:
35709
+ name:
35710
+ type: string
35711
+ minLength: 1
35712
+ description: Volume name.
35713
+ storage:
35714
+ type: string
35715
+ description: Desired size with Gi suffix, for example 30Gi.
35716
+ instanceTemplateVolumeExpand:
35717
+ type: object
35718
+ required:
35719
+ - name
35720
+ - volumes
35721
+ properties:
35722
+ name:
35723
+ type: string
35724
+ minLength: 1
35725
+ description: Template name from the current mode component instanceTemplate.names.
35726
+ volumes:
35727
+ type: array
35728
+ minItems: 1
35729
+ items:
35730
+ $ref: '#/components/schemas/opsVolumeExpandVolumesItems0'
35697
35731
  opsVolumeExpand:
35698
- description: OpsVolumeExpand is the payload to expand volume for a KubeBlocks cluster
35732
+ description: Expand component volumes and explicit targets for components with template expansion enabled.
35699
35733
  properties:
35734
+ instanceTemplates:
35735
+ type: array
35736
+ minItems: 1
35737
+ description: Required when the current mode component instanceTemplate.ops includes storageExpansion; otherwise omit for component-level expansion. Explicit targets require this capability. Every configured template must explicitly specify the same volume names and target capacities as component-level volumes. Names identify templates, not Pods. Targets are forwarded together in one OpsRequest without filling in, merging, or removing template targets. KubeBlocks may materialize template volumeClaimTemplates for explicitly targeted inherited volumes.
35738
+ items:
35739
+ $ref: '#/components/schemas/instanceTemplateVolumeExpand'
35700
35740
  component:
35701
35741
  type: string
35702
35742
  minLength: 1
@@ -35704,17 +35744,7 @@ components:
35704
35744
  type: array
35705
35745
  minItems: 1
35706
35746
  items:
35707
- type: object
35708
- properties:
35709
- name:
35710
- type: string
35711
- description: volume name
35712
- storage:
35713
- type: string
35714
- description: Storage size, the unit is Gi.
35715
- required:
35716
- - name
35717
- - storage
35747
+ $ref: '#/components/schemas/opsVolumeExpandVolumesItems0'
35718
35748
  required:
35719
35749
  - volumes
35720
35750
  - component
@@ -39442,6 +39472,7 @@ components:
39442
39472
  enum:
39443
39473
  - hscale
39444
39474
  - vscale
39475
+ - storageExpansion
39445
39476
  instanceTemplateAttribute:
39446
39477
  type: string
39447
39478
  description: Heterogeneous attribute the frontend may render on an instance template at create.
@@ -39449,6 +39480,8 @@ components:
39449
39480
  - env
39450
39481
  - annotations
39451
39482
  - labels
39483
+ - availabilityZone
39484
+ - storageClass
39452
39485
  instanceTemplateEnv:
39453
39486
  type: object
39454
39487
  description: One fillable env var on an instance template, for frontend rendering.
@@ -39493,19 +39526,9 @@ components:
39493
39526
  instanceTemplate:
39494
39527
  type: object
39495
39528
  description: |
39496
- Frontend catalog of instance templates for this mode component.
39497
- names, ops, attributes, and env are for UI rendering. Create
39498
- validates the request against chart-rendered Cluster instances,
39499
- not this catalog. HScale does not re-check this catalog; it
39500
- builds the OpsRequest from the request and the live Cluster.
39501
- HScale instanceTemplates still requires top-level replicas.
39502
- ops lists hscale and vscale for the UI (vscale is reserved;
39503
- class stays component-level). Only HScale processes instance templates.
39504
- VolumeExpansion, VScale, Upgrade, Restart, and other operations silently
39505
- ignore instance templates and keep their component-level behavior.
39506
- Template-level volumeexpansion is not implemented.
39507
- The platform does not even-split or fill in missing templates.
39508
- When absent, the frontend should use component-level operations.
39529
+ Template fields and operations shared by the frontend and backend.
39530
+ Declaring storageExpansion in ops requires explicit volume expansion targets
39531
+ for every name. Components without this capability use component-level expansion.
39509
39532
  required:
39510
39533
  - names
39511
39534
  - ops
@@ -39519,18 +39542,16 @@ components:
39519
39542
  description: |
39520
39543
  Instance template names the frontend should render.
39521
39544
  Create and hscale check names against the chart or live Cluster,
39522
- not this list.
39545
+ not this list. Explicit volume expansion targets must include every name in this list.
39523
39546
  ops:
39524
39547
  type: array
39525
39548
  minItems: 1
39526
39549
  items:
39527
39550
  $ref: '#/components/schemas/instanceTemplateOp'
39528
39551
  description: |
39529
- Operations the frontend should offer per template: hscale, vscale.
39530
- Not re-checked when creating a cluster or building an hscale OpsRequest.
39531
- Only hscale currently acts per template; vscale is reserved.
39532
- VolumeExpansion, VScale, Upgrade, and Restart ignore instance templates
39533
- and keep their component-level behavior.
39552
+ Template operations: hscale, storageExpansion, and reserved vscale.
39553
+ Explicit volume expansion targets must match component volume names
39554
+ and target capacities.
39534
39555
  attributes:
39535
39556
  type: array
39536
39557
  uniqueItems: true
@@ -610,6 +610,7 @@ models/instance-template-create.ts
610
610
  models/instance-template-env.ts
611
611
  models/instance-template-op.ts
612
612
  models/instance-template-replicas.ts
613
+ models/instance-template-volume-expand.ts
613
614
  models/instance.ts
614
615
  models/integer-option.ts
615
616
  models/international-desc.ts
@@ -771,7 +772,7 @@ models/ops-restart.ts
771
772
  models/ops-start.ts
772
773
  models/ops-stop.ts
773
774
  models/ops-upgrade.ts
774
- models/ops-volume-expand-volumes-inner.ts
775
+ models/ops-volume-expand-volumes-items0.ts
775
776
  models/ops-volume-expand.ts
776
777
  models/ops-vscale.ts
777
778
  models/oracle-tablespace-contents.ts
@@ -516,6 +516,7 @@ export * from './instance-template-create-env-inner';
516
516
  export * from './instance-template-env';
517
517
  export * from './instance-template-op';
518
518
  export * from './instance-template-replicas';
519
+ export * from './instance-template-volume-expand';
519
520
  export * from './integer-option';
520
521
  export * from './international-desc';
521
522
  export * from './io-quantity';
@@ -678,7 +679,7 @@ export * from './ops-stop';
678
679
  export * from './ops-upgrade';
679
680
  export * from './ops-vscale';
680
681
  export * from './ops-volume-expand';
681
- export * from './ops-volume-expand-volumes-inner';
682
+ export * from './ops-volume-expand-volumes-items0';
682
683
  export * from './oracle-tablespace';
683
684
  export * from './oracle-tablespace-contents';
684
685
  export * from './oracle-tablespace-create';
@@ -23,7 +23,9 @@
23
23
  export const InstanceTemplateAttribute = {
24
24
  env: 'env',
25
25
  annotations: 'annotations',
26
- labels: 'labels'
26
+ labels: 'labels',
27
+ availabilityZone: 'availabilityZone',
28
+ storageClass: 'storageClass'
27
29
  } as const;
28
30
 
29
31
  export type InstanceTemplateAttribute = typeof InstanceTemplateAttribute[keyof typeof InstanceTemplateAttribute];
@@ -18,7 +18,7 @@
18
18
  import type { InstanceTemplateCreateEnvInner } from './instance-template-create-env-inner';
19
19
 
20
20
  /**
21
- * 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.
21
+ * Create assignment for one instance template. name and replicas are required. env, annotations, labels, availabilityZone, and storageClass are optional overlays onto the chart-rendered instance. The request must include every chart-rendered instance template exactly once. A template with an explicit zone uses single-zone scheduling: hostname anti-affinity follows the scheduling policy, while explicit rules and additional topology keys are preserved. Component scheduling remains unchanged; templates without a zone inherit it, including its zone anti-affinity constraints. Chart instance scheduling policies are cleared; an omitted or empty availabilityZone leaves the instance policy unset to inherit the component policy.
22
22
  * @export
23
23
  * @interface InstanceTemplateCreate
24
24
  */
@@ -35,6 +35,18 @@ export interface InstanceTemplateCreate {
35
35
  * @memberof InstanceTemplateCreate
36
36
  */
37
37
  'replicas': number;
38
+ /**
39
+ * Availability zone for this template (topology.kubernetes.io/zone); omitted or empty inherits the component zone selection. Must be enabled in the environment. If the request explicitly supplies a non-empty cluster availabilityZones list, the template zone must also belong to that list.
40
+ * @type {string}
41
+ * @memberof InstanceTemplateCreate
42
+ */
43
+ 'availabilityZone'?: string;
44
+ /**
45
+ * StorageClass name for all persistent volumes in this template. Copied from component volumeClaimTemplates, preserving volume sizes and other settings while overriding storageClassName. Chart instance volume templates are cleared; omitted or empty leaves instance volumeClaimTemplates unset.
46
+ * @type {string}
47
+ * @memberof InstanceTemplateCreate
48
+ */
49
+ 'storageClass'?: string;
38
50
  /**
39
51
  * Simple env vars (name and value only) merged into this template. valueFrom is not supported; overlaying a name clears any chart valueFrom.
40
52
  * @type {Array<InstanceTemplateCreateEnvInner>}
@@ -22,7 +22,8 @@
22
22
 
23
23
  export const InstanceTemplateOp = {
24
24
  hscale: 'hscale',
25
- vscale: 'vscale'
25
+ vscale: 'vscale',
26
+ storageExpansion: 'storageExpansion'
26
27
  } as const;
27
28
 
28
29
  export type InstanceTemplateOp = typeof InstanceTemplateOp[keyof typeof InstanceTemplateOp];
@@ -0,0 +1,39 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KubeBlocks Cloud API
5
+ * KubeBlocks Cloud API is a RESTful API for managing KubeBlocks Cloud resources. The API is organized around REST. Our API has predictable resource-oriented URLs, accepts `JSON-encoded` request bodies, returns `JSON-encoded` responses, and uses standard HTTP response codes, authentication, and verbs. We use standard HTTP authentication and provide API keys to identify who you are. Your API keys carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
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 { OpsVolumeExpandVolumesItems0 } from './ops-volume-expand-volumes-items0';
19
+
20
+ /**
21
+ *
22
+ * @export
23
+ * @interface InstanceTemplateVolumeExpand
24
+ */
25
+ export interface InstanceTemplateVolumeExpand {
26
+ /**
27
+ * Template name from the current mode component instanceTemplate.names.
28
+ * @type {string}
29
+ * @memberof InstanceTemplateVolumeExpand
30
+ */
31
+ 'name': string;
32
+ /**
33
+ *
34
+ * @type {Array<OpsVolumeExpandVolumesItems0>}
35
+ * @memberof InstanceTemplateVolumeExpand
36
+ */
37
+ 'volumes': Array<OpsVolumeExpandVolumesItems0>;
38
+ }
39
+
@@ -24,19 +24,19 @@ import type { InstanceTemplateEnv } from './instance-template-env';
24
24
  import type { InstanceTemplateOp } from './instance-template-op';
25
25
 
26
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.
27
+ * Template fields and operations shared by the frontend and backend. Declaring storageExpansion in ops requires explicit volume expansion targets for every name. Components without this capability use component-level expansion.
28
28
  * @export
29
29
  * @interface ModeComponentInstanceTemplate
30
30
  */
31
31
  export interface ModeComponentInstanceTemplate {
32
32
  /**
33
- * Instance template names the frontend should render. Create and hscale check names against the chart or live Cluster, not this list.
33
+ * Instance template names the frontend should render. Create and hscale check names against the chart or live Cluster, not this list. Explicit volume expansion targets must include every name in this list.
34
34
  * @type {Set<string>}
35
35
  * @memberof ModeComponentInstanceTemplate
36
36
  */
37
37
  'names': Set<string>;
38
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.
39
+ * Template operations: hscale, storageExpansion, and reserved vscale. Explicit volume expansion targets must match component volume names and target capacities.
40
40
  * @type {Array<InstanceTemplateOp>}
41
41
  * @memberof ModeComponentInstanceTemplate
42
42
  */
@@ -17,19 +17,19 @@
17
17
  /**
18
18
  *
19
19
  * @export
20
- * @interface OpsVolumeExpandVolumesInner
20
+ * @interface OpsVolumeExpandVolumesItems0
21
21
  */
22
- export interface OpsVolumeExpandVolumesInner {
22
+ export interface OpsVolumeExpandVolumesItems0 {
23
23
  /**
24
- * volume name
24
+ * Volume name.
25
25
  * @type {string}
26
- * @memberof OpsVolumeExpandVolumesInner
26
+ * @memberof OpsVolumeExpandVolumesItems0
27
27
  */
28
28
  'name': string;
29
29
  /**
30
- * Storage size, the unit is Gi.
30
+ * Desired size with Gi suffix, for example 30Gi.
31
31
  * @type {string}
32
- * @memberof OpsVolumeExpandVolumesInner
32
+ * @memberof OpsVolumeExpandVolumesItems0
33
33
  */
34
34
  'storage': string;
35
35
  }
@@ -15,14 +15,23 @@
15
15
 
16
16
  // May contain unused imports in some cases
17
17
  // @ts-ignore
18
- import type { OpsVolumeExpandVolumesInner } from './ops-volume-expand-volumes-inner';
18
+ import type { InstanceTemplateVolumeExpand } from './instance-template-volume-expand';
19
+ // May contain unused imports in some cases
20
+ // @ts-ignore
21
+ import type { OpsVolumeExpandVolumesItems0 } from './ops-volume-expand-volumes-items0';
19
22
 
20
23
  /**
21
- * OpsVolumeExpand is the payload to expand volume for a KubeBlocks cluster
24
+ * Expand component volumes and explicit targets for components with template expansion enabled.
22
25
  * @export
23
26
  * @interface OpsVolumeExpand
24
27
  */
25
28
  export interface OpsVolumeExpand {
29
+ /**
30
+ * Required when the current mode component instanceTemplate.ops includes storageExpansion; otherwise omit for component-level expansion. Explicit targets require this capability. Every configured template must explicitly specify the same volume names and target capacities as component-level volumes. Names identify templates, not Pods. Targets are forwarded together in one OpsRequest without filling in, merging, or removing template targets. KubeBlocks may materialize template volumeClaimTemplates for explicitly targeted inherited volumes.
31
+ * @type {Array<InstanceTemplateVolumeExpand>}
32
+ * @memberof OpsVolumeExpand
33
+ */
34
+ 'instanceTemplates'?: Array<InstanceTemplateVolumeExpand>;
26
35
  /**
27
36
  *
28
37
  * @type {string}
@@ -31,9 +40,9 @@ export interface OpsVolumeExpand {
31
40
  'component': string;
32
41
  /**
33
42
  *
34
- * @type {Array<OpsVolumeExpandVolumesInner>}
43
+ * @type {Array<OpsVolumeExpandVolumesItems0>}
35
44
  * @memberof OpsVolumeExpand
36
45
  */
37
- 'volumes': Array<OpsVolumeExpandVolumesInner>;
46
+ 'volumes': Array<OpsVolumeExpandVolumesItems0>;
38
47
  }
39
48
 
package/src/openapi.yaml CHANGED
@@ -25671,7 +25671,7 @@ components:
25671
25671
  type: object
25672
25672
  additionalProperties: false
25673
25673
  description: |
25674
- 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.
25674
+ Create assignment for one instance template. name and replicas are required. env, annotations, labels, availabilityZone, and storageClass are optional overlays onto the chart-rendered instance. The request must include every chart-rendered instance template exactly once. A template with an explicit zone uses single-zone scheduling: hostname anti-affinity follows the scheduling policy, while explicit rules and additional topology keys are preserved. Component scheduling remains unchanged; templates without a zone inherit it, including its zone anti-affinity constraints. Chart instance scheduling policies are cleared; an omitted or empty availabilityZone leaves the instance policy unset to inherit the component policy.
25675
25675
  required:
25676
25676
  - name
25677
25677
  - replicas
@@ -25684,6 +25684,12 @@ components:
25684
25684
  type: integer
25685
25685
  minimum: 0
25686
25686
  description: Replica count for this instance template.
25687
+ availabilityZone:
25688
+ type: string
25689
+ description: Availability zone for this template (topology.kubernetes.io/zone); omitted or empty inherits the component zone selection. Must be enabled in the environment. If the request explicitly supplies a non-empty cluster availabilityZones list, the template zone must also belong to that list.
25690
+ storageClass:
25691
+ type: string
25692
+ description: StorageClass name for all persistent volumes in this template. Copied from component volumeClaimTemplates, preserving volume sizes and other settings while overriding storageClassName. Chart instance volume templates are cleared; omitted or empty leaves instance volumeClaimTemplates unset.
25687
25693
  env:
25688
25694
  type: array
25689
25695
  description: Simple env vars (name and value only) merged into this template. valueFrom is not supported; overlaying a name clears any chart valueFrom.
@@ -27686,9 +27692,43 @@ components:
27686
27692
  type: array
27687
27693
  items:
27688
27694
  $ref: '#/components/schemas/engineServiceVersionsItem'
27695
+ opsVolumeExpandVolumesItems0:
27696
+ type: object
27697
+ required:
27698
+ - name
27699
+ - storage
27700
+ properties:
27701
+ name:
27702
+ type: string
27703
+ minLength: 1
27704
+ description: Volume name.
27705
+ storage:
27706
+ type: string
27707
+ description: Desired size with Gi suffix, for example 30Gi.
27708
+ instanceTemplateVolumeExpand:
27709
+ type: object
27710
+ required:
27711
+ - name
27712
+ - volumes
27713
+ properties:
27714
+ name:
27715
+ type: string
27716
+ minLength: 1
27717
+ description: Template name from the current mode component instanceTemplate.names.
27718
+ volumes:
27719
+ type: array
27720
+ minItems: 1
27721
+ items:
27722
+ $ref: '#/components/schemas/opsVolumeExpandVolumesItems0'
27689
27723
  opsVolumeExpand:
27690
- description: OpsVolumeExpand is the payload to expand volume for a KubeBlocks cluster
27724
+ description: Expand component volumes and explicit targets for components with template expansion enabled.
27691
27725
  properties:
27726
+ instanceTemplates:
27727
+ type: array
27728
+ minItems: 1
27729
+ description: Required when the current mode component instanceTemplate.ops includes storageExpansion; otherwise omit for component-level expansion. Explicit targets require this capability. Every configured template must explicitly specify the same volume names and target capacities as component-level volumes. Names identify templates, not Pods. Targets are forwarded together in one OpsRequest without filling in, merging, or removing template targets. KubeBlocks may materialize template volumeClaimTemplates for explicitly targeted inherited volumes.
27730
+ items:
27731
+ $ref: '#/components/schemas/instanceTemplateVolumeExpand'
27692
27732
  component:
27693
27733
  type: string
27694
27734
  minLength: 1
@@ -27696,17 +27736,7 @@ components:
27696
27736
  type: array
27697
27737
  minItems: 1
27698
27738
  items:
27699
- type: object
27700
- properties:
27701
- name:
27702
- type: string
27703
- description: volume name
27704
- storage:
27705
- type: string
27706
- description: Storage size, the unit is Gi.
27707
- required:
27708
- - name
27709
- - storage
27739
+ $ref: '#/components/schemas/opsVolumeExpandVolumesItems0'
27710
27740
  required:
27711
27741
  - volumes
27712
27742
  - component
@@ -32924,6 +32954,7 @@ components:
32924
32954
  enum:
32925
32955
  - hscale
32926
32956
  - vscale
32957
+ - storageExpansion
32927
32958
  instanceTemplateAttribute:
32928
32959
  type: string
32929
32960
  description: Heterogeneous attribute the frontend may render on an instance template at create.
@@ -32931,6 +32962,8 @@ components:
32931
32962
  - env
32932
32963
  - annotations
32933
32964
  - labels
32965
+ - availabilityZone
32966
+ - storageClass
32934
32967
  instanceTemplateEnv:
32935
32968
  type: object
32936
32969
  description: One fillable env var on an instance template, for frontend rendering.
@@ -32975,19 +33008,9 @@ components:
32975
33008
  instanceTemplate:
32976
33009
  type: object
32977
33010
  description: |
32978
- Frontend catalog of instance templates for this mode component.
32979
- names, ops, attributes, and env are for UI rendering. Create
32980
- validates the request against chart-rendered Cluster instances,
32981
- not this catalog. HScale does not re-check this catalog; it
32982
- builds the OpsRequest from the request and the live Cluster.
32983
- HScale instanceTemplates still requires top-level replicas.
32984
- ops lists hscale and vscale for the UI (vscale is reserved;
32985
- class stays component-level). Only HScale processes instance templates.
32986
- VolumeExpansion, VScale, Upgrade, Restart, and other operations silently
32987
- ignore instance templates and keep their component-level behavior.
32988
- Template-level volumeexpansion is not implemented.
32989
- The platform does not even-split or fill in missing templates.
32990
- When absent, the frontend should use component-level operations.
33011
+ Template fields and operations shared by the frontend and backend.
33012
+ Declaring storageExpansion in ops requires explicit volume expansion targets
33013
+ for every name. Components without this capability use component-level expansion.
32991
33014
  required:
32992
33015
  - names
32993
33016
  - ops
@@ -33001,18 +33024,16 @@ components:
33001
33024
  description: |
33002
33025
  Instance template names the frontend should render.
33003
33026
  Create and hscale check names against the chart or live Cluster,
33004
- not this list.
33027
+ not this list. Explicit volume expansion targets must include every name in this list.
33005
33028
  ops:
33006
33029
  type: array
33007
33030
  minItems: 1
33008
33031
  items:
33009
33032
  $ref: '#/components/schemas/instanceTemplateOp'
33010
33033
  description: |
33011
- Operations the frontend should offer per template: hscale, vscale.
33012
- Not re-checked when creating a cluster or building an hscale OpsRequest.
33013
- Only hscale currently acts per template; vscale is reserved.
33014
- VolumeExpansion, VScale, Upgrade, and Restart ignore instance templates
33015
- and keep their component-level behavior.
33034
+ Template operations: hscale, storageExpansion, and reserved vscale.
33035
+ Explicit volume expansion targets must match component volume names
33036
+ and target capacities.
33016
33037
  attributes:
33017
33038
  type: array
33018
33039
  uniqueItems: true
@@ -1 +0,0 @@
1
- {"version":3,"file":"ops-volume-expand-volumes-inner.d.ts","sourceRoot":"","sources":["../../../src/adminapi/models/ops-volume-expand-volumes-inner.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAIH;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IACxC;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;CACrB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ops-volume-expand-volumes-inner.js","sourceRoot":"","sources":["../../../src/adminapi/models/ops-volume-expand-volumes-inner.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ops-volume-expand-volumes-inner.d.ts","sourceRoot":"","sources":["../../../src/openapi/models/ops-volume-expand-volumes-inner.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAIH;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IACxC;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;CACrB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ops-volume-expand-volumes-inner.js","sourceRoot":"","sources":["../../../src/openapi/models/ops-volume-expand-volumes-inner.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG"}