kb-cloud-client-typescript 2.4.0-alpha.124 → 2.4.0-alpha.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adminapi/models/component-item-create.d.ts +8 -0
- package/dist/adminapi/models/component-item-create.d.ts.map +1 -1
- package/dist/adminapi/models/component-item.d.ts +8 -0
- package/dist/adminapi/models/component-item.d.ts.map +1 -1
- package/dist/adminapi/models/component-option.d.ts +6 -0
- package/dist/adminapi/models/component-option.d.ts.map +1 -1
- package/dist/adminapi/models/index.d.ts +1 -0
- package/dist/adminapi/models/index.d.ts.map +1 -1
- package/dist/adminapi/models/index.js +1 -0
- package/dist/adminapi/models/index.js.map +1 -1
- package/dist/adminapi/models/static-cluster-component.d.ts +43 -0
- package/dist/adminapi/models/static-cluster-component.d.ts.map +1 -0
- package/dist/adminapi/models/static-cluster-component.js +16 -0
- package/dist/adminapi/models/static-cluster-component.js.map +1 -0
- package/dist/adminapi/models/static-cluster.d.ts +4 -15
- package/dist/adminapi/models/static-cluster.d.ts.map +1 -1
- package/dist/adminapi/models/victoria-logs-config.d.ts.map +1 -1
- package/dist/internalapi/api.d.ts +1 -0
- package/dist/internalapi/api.d.ts.map +1 -1
- package/dist/internalapi/api.js +1 -0
- package/dist/internalapi/api.js.map +1 -1
- package/dist/internalapi/apis/victoria-logs-cluster-api.d.ts +113 -0
- package/dist/internalapi/apis/victoria-logs-cluster-api.d.ts.map +1 -0
- package/dist/internalapi/apis/victoria-logs-cluster-api.js +135 -0
- package/dist/internalapi/apis/victoria-logs-cluster-api.js.map +1 -0
- package/dist/internalapi/apis/victoria-metrics-cluster-api.d.ts +11 -2
- package/dist/internalapi/apis/victoria-metrics-cluster-api.d.ts.map +1 -1
- package/dist/internalapi/apis/victoria-metrics-cluster-api.js +9 -5
- package/dist/internalapi/apis/victoria-metrics-cluster-api.js.map +1 -1
- package/dist/internalapi/models/component-item.d.ts +8 -0
- package/dist/internalapi/models/component-item.d.ts.map +1 -1
- package/dist/internalapi/models/index.d.ts +2 -0
- package/dist/internalapi/models/index.d.ts.map +1 -1
- package/dist/internalapi/models/index.js +2 -0
- package/dist/internalapi/models/index.js.map +1 -1
- package/dist/internalapi/models/static-cluster-component.d.ts +43 -0
- package/dist/internalapi/models/static-cluster-component.d.ts.map +1 -0
- package/dist/internalapi/models/static-cluster-component.js +16 -0
- package/dist/internalapi/models/static-cluster-component.js.map +1 -0
- package/dist/internalapi/models/static-cluster.d.ts +4 -15
- package/dist/internalapi/models/static-cluster.d.ts.map +1 -1
- package/dist/internalapi/models/victoria-logs-config.d.ts +18 -0
- package/dist/internalapi/models/victoria-logs-config.d.ts.map +1 -0
- package/dist/internalapi/models/victoria-logs-config.js +16 -0
- package/dist/internalapi/models/victoria-logs-config.js.map +1 -0
- package/dist/openapi/models/component-item-create.d.ts +8 -0
- package/dist/openapi/models/component-item-create.d.ts.map +1 -1
- package/dist/openapi/models/component-item.d.ts +8 -0
- package/dist/openapi/models/component-item.d.ts.map +1 -1
- package/dist/openapi/models/component-option.d.ts +6 -0
- package/dist/openapi/models/component-option.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adminapi/.openapi-generator/FILES +1 -0
- package/src/adminapi/models/component-item-create.ts +6 -0
- package/src/adminapi/models/component-item.ts +6 -0
- package/src/adminapi/models/component-option.ts +6 -0
- package/src/adminapi/models/index.ts +1 -0
- package/src/adminapi/models/static-cluster-component.ts +48 -0
- package/src/adminapi/models/static-cluster.ts +6 -15
- package/src/adminapi/models/victoria-logs-config.ts +3 -0
- package/src/adminapi.yaml +43 -10
- package/src/internalapi/.openapi-generator/FILES +3 -0
- package/src/internalapi/api.ts +1 -0
- package/src/internalapi/apis/victoria-logs-cluster-api.ts +183 -0
- package/src/internalapi/apis/victoria-metrics-cluster-api.ts +19 -5
- package/src/internalapi/models/component-item.ts +6 -0
- package/src/internalapi/models/index.ts +2 -0
- package/src/internalapi/models/static-cluster-component.ts +48 -0
- package/src/internalapi/models/static-cluster.ts +6 -15
- package/src/internalapi/models/victoria-logs-config.ts +29 -0
- package/src/internalapi.yaml +90 -8
- package/src/openapi/models/component-item-create.ts +6 -0
- package/src/openapi/models/component-item.ts +6 -0
- package/src/openapi/models/component-option.ts +6 -0
- package/src/openapi.yaml +14 -0
|
@@ -86,6 +86,12 @@ export interface ComponentOption {
|
|
|
86
86
|
* @memberof ComponentOption
|
|
87
87
|
*/
|
|
88
88
|
'customAnnotations'?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* 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.
|
|
91
|
+
* @type {boolean}
|
|
92
|
+
* @memberof ComponentOption
|
|
93
|
+
*/
|
|
94
|
+
'customLabels'?: boolean;
|
|
89
95
|
/**
|
|
90
96
|
* whether the component supports custom secret
|
|
91
97
|
* @type {boolean}
|
|
@@ -1099,6 +1099,7 @@ export * from './sql-audit-switch-option';
|
|
|
1099
1099
|
export * from './standard-definition';
|
|
1100
1100
|
export * from './standard-resource';
|
|
1101
1101
|
export * from './static-cluster';
|
|
1102
|
+
export * from './static-cluster-component';
|
|
1102
1103
|
export * from './storage';
|
|
1103
1104
|
export * from './storage-check-result';
|
|
1104
1105
|
export * from './storage-class-create';
|
|
@@ -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
|
-
*
|
|
25
|
-
* @type {
|
|
27
|
+
* Optional component overrides. Unknown, duplicate or other-engine components are rejected.
|
|
28
|
+
* @type {Array<StaticClusterComponent>}
|
|
26
29
|
* @memberof StaticCluster
|
|
27
30
|
*/
|
|
28
|
-
'
|
|
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
|
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
// May contain unused imports in some cases
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
import type { StaticCluster } from './static-cluster';
|
|
19
|
+
// May contain unused imports in some cases
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import type { StaticClusterComponent } from './static-cluster-component';
|
|
19
22
|
|
|
20
23
|
/**
|
|
21
24
|
* @type VictoriaLogsConfig
|
package/src/adminapi.yaml
CHANGED
|
@@ -33661,6 +33661,11 @@ components:
|
|
|
33661
33661
|
additionalProperties:
|
|
33662
33662
|
type: string
|
|
33663
33663
|
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.
|
|
33664
|
+
labels:
|
|
33665
|
+
type: object
|
|
33666
|
+
additionalProperties:
|
|
33667
|
+
type: string
|
|
33668
|
+
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.
|
|
33664
33669
|
nodeGroup:
|
|
33665
33670
|
type: string
|
|
33666
33671
|
description: Optional host group in this environment and the explicitly selected availabilityZone. Requires availabilityZone; no upper-level host group is inherited.
|
|
@@ -34011,6 +34016,11 @@ components:
|
|
|
34011
34016
|
additionalProperties:
|
|
34012
34017
|
type: string
|
|
34013
34018
|
description: User-provided component annotations. Does not include chart defaults or system-generated values.
|
|
34019
|
+
labels:
|
|
34020
|
+
type: object
|
|
34021
|
+
additionalProperties:
|
|
34022
|
+
type: string
|
|
34023
|
+
description: User-provided component labels. Does not include chart defaults or system-generated values.
|
|
34014
34024
|
nodeGroup:
|
|
34015
34025
|
type: string
|
|
34016
34026
|
description: Optional host group in this environment. Explicit placement does not inherit an upper-level host group.
|
|
@@ -39724,20 +39734,39 @@ components:
|
|
|
39724
39734
|
description: the tags for the storage
|
|
39725
39735
|
additionalProperties:
|
|
39726
39736
|
type: string
|
|
39727
|
-
|
|
39737
|
+
staticClusterComponent:
|
|
39738
|
+
type: object
|
|
39739
|
+
required:
|
|
39740
|
+
- component
|
|
39728
39741
|
properties:
|
|
39742
|
+
component:
|
|
39743
|
+
type: string
|
|
39744
|
+
minLength: 1
|
|
39745
|
+
description: Exact component name supported by the selected engine during environment installation. Each component may appear only once.
|
|
39729
39746
|
replicas:
|
|
39730
|
-
title: Replicas
|
|
39731
39747
|
type: integer
|
|
39732
|
-
|
|
39733
|
-
|
|
39734
|
-
title: Storage(Gi)
|
|
39748
|
+
format: int64
|
|
39749
|
+
nullable: true
|
|
39735
39750
|
minimum: 1
|
|
39736
|
-
|
|
39737
|
-
description: Storage size, the unit is Gi.
|
|
39738
|
-
format: double
|
|
39751
|
+
description: Number of replicas. Omit to keep the installer default.
|
|
39739
39752
|
classCode:
|
|
39740
39753
|
type: string
|
|
39754
|
+
description: Resource class for this exact engine, mode and component. Omit to keep the installer default.
|
|
39755
|
+
storage:
|
|
39756
|
+
type: number
|
|
39757
|
+
format: double
|
|
39758
|
+
nullable: true
|
|
39759
|
+
minimum: 1
|
|
39760
|
+
description: Disk capacity in Gi. Only vm-storage, vlstorage and minio accept this field.
|
|
39761
|
+
staticCluster:
|
|
39762
|
+
type: object
|
|
39763
|
+
properties:
|
|
39764
|
+
components:
|
|
39765
|
+
type: array
|
|
39766
|
+
maxItems: 3
|
|
39767
|
+
description: Optional component overrides. Unknown, duplicate or other-engine components are rejected.
|
|
39768
|
+
items:
|
|
39769
|
+
$ref: '#/components/schemas/staticClusterComponent'
|
|
39741
39770
|
environmentStorage:
|
|
39742
39771
|
type: object
|
|
39743
39772
|
description: Storage config
|
|
@@ -39892,10 +39921,10 @@ components:
|
|
|
39892
39921
|
storage:
|
|
39893
39922
|
$ref: '#/components/schemas/storageConfig'
|
|
39894
39923
|
victoriaMetrics:
|
|
39895
|
-
description: Optional
|
|
39924
|
+
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.
|
|
39896
39925
|
$ref: '#/components/schemas/staticCluster'
|
|
39897
39926
|
victoriaLogs:
|
|
39898
|
-
description: Optional
|
|
39927
|
+
description: Optional per-component resources for vlstorage, vlselect and vlinsert, plus log retention. Omitted components and fields keep installer defaults; only vlstorage accepts disk capacity.
|
|
39899
39928
|
$ref: '#/components/schemas/victoriaLogsConfig'
|
|
39900
39929
|
modules:
|
|
39901
39930
|
type: array
|
|
@@ -43169,6 +43198,10 @@ components:
|
|
|
43169
43198
|
type: boolean
|
|
43170
43199
|
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.
|
|
43171
43200
|
x-nullable: false
|
|
43201
|
+
customLabels:
|
|
43202
|
+
type: boolean
|
|
43203
|
+
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.
|
|
43204
|
+
x-nullable: false
|
|
43172
43205
|
customSecret:
|
|
43173
43206
|
type: boolean
|
|
43174
43207
|
description: whether the component supports custom secret
|
|
@@ -19,6 +19,7 @@ apis/recycle-bin-cluster-api.ts
|
|
|
19
19
|
apis/shared-api.ts
|
|
20
20
|
apis/slaapi.ts
|
|
21
21
|
apis/storage-api.ts
|
|
22
|
+
apis/victoria-logs-cluster-api.ts
|
|
22
23
|
apis/victoria-metrics-cluster-api.ts
|
|
23
24
|
base.ts
|
|
24
25
|
common.ts
|
|
@@ -89,9 +90,11 @@ models/reconfigure-create.ts
|
|
|
89
90
|
models/scheduling-policy-type.ts
|
|
90
91
|
models/service-descriptor.ts
|
|
91
92
|
models/service-ref.ts
|
|
93
|
+
models/static-cluster-component.ts
|
|
92
94
|
models/static-cluster.ts
|
|
93
95
|
models/storage-create.ts
|
|
94
96
|
models/storage.ts
|
|
95
97
|
models/tag.ts
|
|
96
98
|
models/task-schedule-type.ts
|
|
97
99
|
models/task-schedule.ts
|
|
100
|
+
models/victoria-logs-config.ts
|
package/src/internalapi/api.ts
CHANGED
|
@@ -31,5 +31,6 @@ export * from './apis/recycle-bin-cluster-api';
|
|
|
31
31
|
export * from './apis/slaapi';
|
|
32
32
|
export * from './apis/shared-api';
|
|
33
33
|
export * from './apis/storage-api';
|
|
34
|
+
export * from './apis/victoria-logs-cluster-api';
|
|
34
35
|
export * from './apis/victoria-metrics-cluster-api';
|
|
35
36
|
|
|
@@ -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 { VictoriaLogsConfig } 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 and retention. Omitted components keep installer defaults.
|
|
38
|
+
* @summary Create VictoriaLogs cluster
|
|
39
|
+
* @param {string} environmentName name of the environment
|
|
40
|
+
* @param {VictoriaLogsConfig} [victoriaLogsConfig]
|
|
41
|
+
* @param {*} [options] Override http request option.
|
|
42
|
+
* @throws {RequiredError}
|
|
43
|
+
*/
|
|
44
|
+
createVictoriaLogsCluster: async (environmentName: string, victoriaLogsConfig?: VictoriaLogsConfig, 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(victoriaLogsConfig, 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 and retention. Omitted components keep installer defaults.
|
|
90
|
+
* @summary Create VictoriaLogs cluster
|
|
91
|
+
* @param {string} environmentName name of the environment
|
|
92
|
+
* @param {VictoriaLogsConfig} [victoriaLogsConfig]
|
|
93
|
+
* @param {*} [options] Override http request option.
|
|
94
|
+
* @throws {RequiredError}
|
|
95
|
+
*/
|
|
96
|
+
async createVictoriaLogsCluster(environmentName: string, victoriaLogsConfig?: VictoriaLogsConfig, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Cluster>> {
|
|
97
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createVictoriaLogsCluster(environmentName, victoriaLogsConfig, 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 and retention. 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.victoriaLogsConfig, 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 and retention. 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 {VictoriaLogsConfig}
|
|
159
|
+
* @memberof VictoriaLogsClusterApiCreateVictoriaLogsCluster
|
|
160
|
+
*/
|
|
161
|
+
readonly victoriaLogsConfig?: VictoriaLogsConfig
|
|
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 and retention. 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.victoriaLogsConfig, 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}
|
|
@@ -62,8 +62,10 @@ export * from './scheduling-policy-type';
|
|
|
62
62
|
export * from './service-descriptor';
|
|
63
63
|
export * from './service-ref';
|
|
64
64
|
export * from './static-cluster';
|
|
65
|
+
export * from './static-cluster-component';
|
|
65
66
|
export * from './storage';
|
|
66
67
|
export * from './storage-create';
|
|
67
68
|
export * from './tag';
|
|
68
69
|
export * from './task-schedule';
|
|
69
70
|
export * from './task-schedule-type';
|
|
71
|
+
export * from './victoria-logs-config';
|
|
@@ -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
|
-
*
|
|
25
|
-
* @type {
|
|
27
|
+
* Optional component overrides. Unknown, duplicate or other-engine components are rejected.
|
|
28
|
+
* @type {Array<StaticClusterComponent>}
|
|
26
29
|
* @memberof StaticCluster
|
|
27
30
|
*/
|
|
28
|
-
'
|
|
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
|
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
// May contain unused imports in some cases
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import type { StaticCluster } from './static-cluster';
|
|
19
|
+
// May contain unused imports in some cases
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import type { StaticClusterComponent } from './static-cluster-component';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @type VictoriaLogsConfig
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
export type VictoriaLogsConfig = StaticCluster;
|
|
28
|
+
|
|
29
|
+
|