@spinnaker/tencentcloud 0.0.0-2025.1-0
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/CHANGELOG.md +751 -0
- package/LICENSE.txt +203 -0
- package/dist/domain/IKeyPair.d.ts +8 -0
- package/dist/domain/IScalingPolicy.d.ts +44 -0
- package/dist/domain/IScalingProcess.d.ts +10 -0
- package/dist/domain/ITargetTrackingPolicy.d.ts +21 -0
- package/dist/domain/ITencentcloudCertificate.d.ts +5 -0
- package/dist/domain/ITencentcloudHealth.d.ts +18 -0
- package/dist/domain/ITencentcloudInstance.d.ts +4 -0
- package/dist/domain/ITencentcloudLoadBalancer.d.ts +278 -0
- package/dist/domain/ITencentcloudLoadBalancerSourceData.d.ts +171 -0
- package/dist/domain/ITencentcloudScalingPolicy.d.ts +19 -0
- package/dist/domain/ITencentcloudServerGroup.d.ts +43 -0
- package/dist/domain/index.d.ts +11 -0
- package/dist/help/tencentcloud.help.d.ts +1 -0
- package/dist/image/image.reader.d.ts +35 -0
- package/dist/image/index.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +553 -0
- package/dist/index.js.map +1 -0
- package/dist/keyPairs/KeyPairsReader.d.ts +4 -0
- package/dist/keyPairs/index.d.ts +1 -0
- package/dist/pipeline/stages/disableCluster/DisableClusterConfig.d.ts +3 -0
- package/dist/pipeline/stages/disableCluster/DisableClusterStageForm.d.ts +3 -0
- package/dist/pipeline/stages/disableCluster/disableClusterStage.d.ts +1 -0
- package/dist/pipeline/stages/disableCluster/disableClusterValidators.d.ts +2 -0
- package/dist/pipeline/stages/rollbackCluster/RollbackClusterConfig.d.ts +3 -0
- package/dist/pipeline/stages/rollbackCluster/RollbackClusterStageForm.d.ts +3 -0
- package/dist/pipeline/stages/rollbackCluster/rollbackClusterStage.d.ts +1 -0
- package/dist/pipeline/stages/rollbackCluster/rollbackClusterValidators.d.ts +2 -0
- package/dist/pipeline/stages/scaleDownCluster/ScaleDownClusterConfig.d.ts +3 -0
- package/dist/pipeline/stages/scaleDownCluster/ScaleDownClusterStageForm.d.ts +3 -0
- package/dist/pipeline/stages/scaleDownCluster/scaleDownClusterStage.d.ts +1 -0
- package/dist/pipeline/stages/scaleDownCluster/scaledownClusterValidators.d.ts +2 -0
- package/dist/pipeline/stages/shrinkCluster/ShrinkClusterConfig.d.ts +3 -0
- package/dist/pipeline/stages/shrinkCluster/ShrinkClusterStageForm.d.ts +3 -0
- package/dist/pipeline/stages/shrinkCluster/shrinkClusterStage.d.ts +1 -0
- package/dist/pipeline/stages/shrinkCluster/shrinkClusterValidators.d.ts +2 -0
- package/dist/reactShims/index.d.ts +2 -0
- package/dist/reactShims/tencentcloud.ngReact.d.ts +8 -0
- package/dist/reactShims/tencentcloud.react.injector.d.ts +7 -0
- package/dist/reactShims/tencentcloud.react.module.d.ts +1 -0
- package/dist/search/searchResultFormatter.d.ts +1 -0
- package/dist/tencentcloud.module.d.ts +7 -0
- package/dist/tencentcloud.settings.d.ts +26 -0
- package/dist/validation/ApplicationNameValidator.d.ts +1 -0
- package/package.json +37 -0
- package/src/domain/IKeyPair.ts +8 -0
- package/src/domain/IScalingPolicy.ts +84 -0
- package/src/domain/IScalingProcess.ts +11 -0
- package/src/domain/ITargetTrackingPolicy.ts +26 -0
- package/src/domain/ITencentcloudCertificate.ts +6 -0
- package/src/domain/ITencentcloudHealth.ts +21 -0
- package/src/domain/ITencentcloudInstance.ts +5 -0
- package/src/domain/ITencentcloudLoadBalancer.ts +326 -0
- package/src/domain/ITencentcloudLoadBalancerSourceData.ts +189 -0
- package/src/domain/ITencentcloudScalingPolicy.ts +23 -0
- package/src/domain/ITencentcloudServerGroup.ts +46 -0
- package/src/domain/index.ts +11 -0
- package/src/help/tencentcloud.help.ts +5 -0
- package/src/image/image.reader.ts +53 -0
- package/src/image/index.ts +1 -0
- package/src/index.ts +2 -0
- package/src/keyPairs/KeyPairsReader.ts +11 -0
- package/src/keyPairs/index.ts +1 -0
- package/src/logo/tencentcloud.icon.svg +24 -0
- package/src/logo/tencentcloud.logo.less +5 -0
- package/src/logo/tencentcloud.logo.svg +53 -0
- package/src/pipeline/stages/disableCluster/DisableClusterConfig.tsx +27 -0
- package/src/pipeline/stages/disableCluster/DisableClusterStageForm.tsx +87 -0
- package/src/pipeline/stages/disableCluster/disableClusterStage.ts +12 -0
- package/src/pipeline/stages/disableCluster/disableClusterValidators.ts +10 -0
- package/src/pipeline/stages/rollbackCluster/RollbackClusterConfig.tsx +27 -0
- package/src/pipeline/stages/rollbackCluster/RollbackClusterStageForm.tsx +74 -0
- package/src/pipeline/stages/rollbackCluster/rollbackClusterStage.ts +12 -0
- package/src/pipeline/stages/rollbackCluster/rollbackClusterValidators.ts +10 -0
- package/src/pipeline/stages/scaleDownCluster/ScaleDownClusterConfig.tsx +27 -0
- package/src/pipeline/stages/scaleDownCluster/ScaleDownClusterStageForm.tsx +102 -0
- package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.ts +12 -0
- package/src/pipeline/stages/scaleDownCluster/scaledownClusterValidators.ts +10 -0
- package/src/pipeline/stages/shrinkCluster/ShrinkClusterConfig.tsx +27 -0
- package/src/pipeline/stages/shrinkCluster/ShrinkClusterStageForm.tsx +104 -0
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.ts +12 -0
- package/src/pipeline/stages/shrinkCluster/shrinkClusterValidators.ts +10 -0
- package/src/reactShims/index.ts +2 -0
- package/src/reactShims/tencentcloud.ngReact.ts +21 -0
- package/src/reactShims/tencentcloud.react.injector.ts +14 -0
- package/src/reactShims/tencentcloud.react.module.ts +14 -0
- package/src/search/searchResultFormatter.js +10 -0
- package/src/tencentcloud.module.ts +32 -0
- package/src/tencentcloud.settings.ts +35 -0
- package/src/validation/ApplicationNameValidator.ts +71 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IInstance,
|
|
3
|
+
IInstanceCounts,
|
|
4
|
+
ILoadBalancer,
|
|
5
|
+
ILoadBalancerDeleteCommand,
|
|
6
|
+
ILoadBalancerUpsertCommand,
|
|
7
|
+
ISubnet,
|
|
8
|
+
} from '@spinnaker/core';
|
|
9
|
+
|
|
10
|
+
import type { ITencentcloudHealthCheck } from './ITencentcloudHealth';
|
|
11
|
+
import type { ITencentcloudLoadBalancerSourceData } from './ITencentcloudLoadBalancerSourceData';
|
|
12
|
+
import type { ITencentcloudServerGroup } from './ITencentcloudServerGroup';
|
|
13
|
+
|
|
14
|
+
export type ClassicListenerProtocol = 'HTTP' | 'HTTPS' | 'TCP' | 'SSL';
|
|
15
|
+
export type ALBListenerProtocol = 'HTTP' | 'HTTPS' | 'TCP' | 'UDP';
|
|
16
|
+
export type IListenerActionType = 'forward' | 'authenticate-oidc' | 'redirect';
|
|
17
|
+
export type NLBListenerProtocol = 'TCP';
|
|
18
|
+
|
|
19
|
+
export interface IAuthenticateOidcActionConfig {
|
|
20
|
+
authorizationEndpoint: string;
|
|
21
|
+
authenticationRequestExtraParams?: any;
|
|
22
|
+
clientId: string;
|
|
23
|
+
clientSecret?: string;
|
|
24
|
+
idpLogoutUrl?: string;
|
|
25
|
+
issuer: string;
|
|
26
|
+
scope: string;
|
|
27
|
+
sessionCookieName: string;
|
|
28
|
+
sessionTimeout?: number;
|
|
29
|
+
tokenEndpoint: string;
|
|
30
|
+
userInfoEndpoint: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface ITencentcloudLoadBalancer extends ILoadBalancer {
|
|
34
|
+
loadBalancerType: any;
|
|
35
|
+
provider: any;
|
|
36
|
+
type: any;
|
|
37
|
+
instances: any[];
|
|
38
|
+
accountId?: string;
|
|
39
|
+
createTime?: string;
|
|
40
|
+
availabilityZones?: string[];
|
|
41
|
+
credentials?: string;
|
|
42
|
+
listeners?: any[];
|
|
43
|
+
detachedInstances?: IInstance[];
|
|
44
|
+
elb?: ITencentcloudLoadBalancerSourceData;
|
|
45
|
+
isInternal?: boolean;
|
|
46
|
+
loadBalacnerVips: string[];
|
|
47
|
+
regionZones: string[];
|
|
48
|
+
serverGroups: ITencentcloudServerGroup[];
|
|
49
|
+
subnets?: string[];
|
|
50
|
+
subnetDetails?: ISubnet[];
|
|
51
|
+
subnetType?: string;
|
|
52
|
+
subnetId?: string;
|
|
53
|
+
id?: string;
|
|
54
|
+
loadBalancerId?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface IClassicListener {
|
|
58
|
+
internalProtocol: ClassicListenerProtocol;
|
|
59
|
+
internalPort: number;
|
|
60
|
+
externalProtocol: ClassicListenerProtocol;
|
|
61
|
+
externalPort: number;
|
|
62
|
+
sslCertificateType?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface ITencentcloudClassicLoadBalancer extends ITencentcloudLoadBalancer {
|
|
66
|
+
region: any;
|
|
67
|
+
cloudProvider: any;
|
|
68
|
+
account: string;
|
|
69
|
+
name: any;
|
|
70
|
+
securityGroups: string[];
|
|
71
|
+
vpcId: string;
|
|
72
|
+
healthCheckPath: string;
|
|
73
|
+
healthCheckPort: number;
|
|
74
|
+
healthCheckProtocol: string;
|
|
75
|
+
healthTimeout: number;
|
|
76
|
+
healthInterval: number;
|
|
77
|
+
healthyThreshold: number;
|
|
78
|
+
listeners: IClassicListener[];
|
|
79
|
+
unhealthyThreshold: number;
|
|
80
|
+
idleTimeout?: number;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface ITencentcloudApplicationLoadBalancer extends ITencentcloudLoadBalancer {
|
|
84
|
+
loadBalancerType: string;
|
|
85
|
+
region: any;
|
|
86
|
+
cloudProvider: any;
|
|
87
|
+
account: string;
|
|
88
|
+
name: any;
|
|
89
|
+
securityGroups: any[];
|
|
90
|
+
vpcId: string;
|
|
91
|
+
listeners: IALBListener[];
|
|
92
|
+
application?: string;
|
|
93
|
+
targetGroups: ITargetGroup[];
|
|
94
|
+
ipAddressType?: string; // returned from clouddriver
|
|
95
|
+
deletionProtection: boolean;
|
|
96
|
+
idleTimeout: number;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface ITencentcloudNetworkLoadBalancer extends ITencentcloudLoadBalancer {
|
|
100
|
+
listeners: INLBListener[];
|
|
101
|
+
targetGroups: ITargetGroup[];
|
|
102
|
+
ipAddressType?: string; // returned from clouddriver
|
|
103
|
+
deletionProtection: boolean;
|
|
104
|
+
idleTimeout: number;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface IRedirectActionConfig {
|
|
108
|
+
host?: string;
|
|
109
|
+
path?: string;
|
|
110
|
+
port?: string;
|
|
111
|
+
protocol?: 'HTTP' | 'HTTPS' | '#{protocol}';
|
|
112
|
+
query?: string;
|
|
113
|
+
statusCode: 'HTTP_301' | 'HTTP_302';
|
|
114
|
+
[k: string]: any;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface IListenerAction {
|
|
118
|
+
authenticateOidcConfig?: IAuthenticateOidcActionConfig;
|
|
119
|
+
order?: number;
|
|
120
|
+
redirectActionConfig?: IRedirectActionConfig; // writes
|
|
121
|
+
redirectConfig?: IRedirectActionConfig; // reads
|
|
122
|
+
targetGroupName?: string;
|
|
123
|
+
type: IListenerActionType;
|
|
124
|
+
port?: number;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface IALBListenerCertificate {
|
|
128
|
+
sslMode?: string;
|
|
129
|
+
certId?: string;
|
|
130
|
+
certCaId?: string;
|
|
131
|
+
certificateArn: string;
|
|
132
|
+
type: string;
|
|
133
|
+
name: string;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface IALBListener {
|
|
137
|
+
certificates: IALBListenerCertificate[];
|
|
138
|
+
port: number;
|
|
139
|
+
protocol: string;
|
|
140
|
+
rules: IListenerRule[];
|
|
141
|
+
sslPolicy?: string;
|
|
142
|
+
listenerId?: string;
|
|
143
|
+
listenerName?: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface INLBListener {
|
|
147
|
+
certificates: IALBListenerCertificate[];
|
|
148
|
+
defaultActions: IListenerAction[];
|
|
149
|
+
port: number;
|
|
150
|
+
protocol: string;
|
|
151
|
+
rules: IListenerRule[];
|
|
152
|
+
sslPolicy?: string;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface IListenerRule {
|
|
156
|
+
domain: string;
|
|
157
|
+
url: string;
|
|
158
|
+
locationId?: string;
|
|
159
|
+
healthCheck?: ITencentcloudHealthCheck;
|
|
160
|
+
default?: boolean;
|
|
161
|
+
priority?: number | 'default';
|
|
162
|
+
[key: string]: any;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export type ListenerRuleConditionField = 'path-pattern' | 'host-header';
|
|
166
|
+
|
|
167
|
+
export interface IListenerRuleCondition {
|
|
168
|
+
field: ListenerRuleConditionField;
|
|
169
|
+
values: string[];
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export interface ITargetGroupAttributes {
|
|
173
|
+
deregistrationDelay: number;
|
|
174
|
+
stickinessEnabled: boolean;
|
|
175
|
+
stickinessType: string;
|
|
176
|
+
stickinessDuration: number;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface ITargetGroup {
|
|
180
|
+
account: string; // returned from clouddriver
|
|
181
|
+
attributes?: ITargetGroupAttributes;
|
|
182
|
+
cloudProvider: string; // returned from clouddriver
|
|
183
|
+
detachedInstances?: IInstance[];
|
|
184
|
+
healthCheckProtocol?: string;
|
|
185
|
+
healthCheckPort?: number;
|
|
186
|
+
healthCheckPath?: string;
|
|
187
|
+
healthTimeout?: number;
|
|
188
|
+
healthInterval?: number;
|
|
189
|
+
healthyThreshold?: number;
|
|
190
|
+
unhealthyThreshold?: number;
|
|
191
|
+
instanceCounts?: IInstanceCounts;
|
|
192
|
+
instances?: IInstance[];
|
|
193
|
+
loadBalancerNames?: string[]; // returned from clouddriver
|
|
194
|
+
name: string;
|
|
195
|
+
port?: number;
|
|
196
|
+
protocol?: string;
|
|
197
|
+
provider?: string;
|
|
198
|
+
region: string; // returned from clouddriver
|
|
199
|
+
serverGroups?: ITencentcloudServerGroup[];
|
|
200
|
+
targetType?: string;
|
|
201
|
+
type: string; // returned from clouddriver
|
|
202
|
+
vpcId?: string;
|
|
203
|
+
vpcName?: string;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export interface IListenerDescription {
|
|
207
|
+
defaultActions?: IListenerAction[];
|
|
208
|
+
isNew?: boolean;
|
|
209
|
+
certificates?: IALBListenerCertificate[];
|
|
210
|
+
certificate?: IALBListenerCertificate;
|
|
211
|
+
protocol: ALBListenerProtocol | NLBListenerProtocol;
|
|
212
|
+
port: number;
|
|
213
|
+
sslPolicy?: string;
|
|
214
|
+
rules?: IListenerRule[];
|
|
215
|
+
healthCheck?: ITencentcloudHealthCheck;
|
|
216
|
+
listenerName?: string;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface IALBTargetGroupDescription {
|
|
220
|
+
name: string;
|
|
221
|
+
protocol: 'HTTP' | 'HTTPS';
|
|
222
|
+
port: number;
|
|
223
|
+
targetType: 'instance' | 'ip';
|
|
224
|
+
attributes: {
|
|
225
|
+
// Defaults to 300
|
|
226
|
+
deregistrationDelay?: number;
|
|
227
|
+
// Defaults to false
|
|
228
|
+
stickinessEnabled?: boolean;
|
|
229
|
+
// Defaults to 'lb_cookie'. The only option for now, but they promise there will be more...
|
|
230
|
+
stickinessType?: 'lb_cookie';
|
|
231
|
+
// Defaults to 86400
|
|
232
|
+
stickinessDuration?: number;
|
|
233
|
+
};
|
|
234
|
+
// Defaults to 10
|
|
235
|
+
healthCheckInterval?: number;
|
|
236
|
+
// Defaults to '200-299'
|
|
237
|
+
healthCheckMatcher?: string;
|
|
238
|
+
healthCheckPath: string;
|
|
239
|
+
healthCheckPort: string;
|
|
240
|
+
healthCheckProtocol: 'HTTP' | 'HTTPS';
|
|
241
|
+
// Defaults to 10
|
|
242
|
+
healthyThreshold?: number;
|
|
243
|
+
// Defaults to 5
|
|
244
|
+
healthCheckTimeout?: number;
|
|
245
|
+
// Defaults to 2
|
|
246
|
+
unhealthyThreshold?: number;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export interface INLBTargetGroupDescription {
|
|
250
|
+
name: string;
|
|
251
|
+
protocol: 'TCP';
|
|
252
|
+
port: number;
|
|
253
|
+
targetType: 'instance' | 'ip';
|
|
254
|
+
attributes: {
|
|
255
|
+
// Defaults to 300
|
|
256
|
+
deregistrationDelay?: number;
|
|
257
|
+
};
|
|
258
|
+
// Defaults to 10
|
|
259
|
+
healthCheckInterval?: number;
|
|
260
|
+
healthCheckPort: string;
|
|
261
|
+
healthCheckProtocol: 'TCP' | 'HTTP' | 'HTTPS';
|
|
262
|
+
healthCheckPath: string;
|
|
263
|
+
// Defaults to 10
|
|
264
|
+
healthyThreshold?: number;
|
|
265
|
+
// Defaults to 5
|
|
266
|
+
healthCheckTimeout?: number;
|
|
267
|
+
// Defaults to 10
|
|
268
|
+
unhealthyThreshold?: number;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export interface ITencentcloudLoadBalancerUpsertCommand extends ILoadBalancerUpsertCommand {
|
|
272
|
+
securityGroupsRemoved?: string;
|
|
273
|
+
Firewalls?: string;
|
|
274
|
+
availabilityZones: { [region: string]: string[] };
|
|
275
|
+
isInternal: boolean;
|
|
276
|
+
// listeners will be overriden and re-typed by extending types (application, classic)
|
|
277
|
+
listeners: any[];
|
|
278
|
+
// If loadBalancerType is not provided, will default to 'classic' for bwc
|
|
279
|
+
loadBalancerType?: 'classic' | 'application' | 'network';
|
|
280
|
+
regionZones: string[];
|
|
281
|
+
securityGroups: string[];
|
|
282
|
+
subnetType: string;
|
|
283
|
+
usePreferredZones?: boolean;
|
|
284
|
+
vpcId: string;
|
|
285
|
+
application: string;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export interface ITencentcloudLoadBalancerDeleteCommand extends ILoadBalancerDeleteCommand {
|
|
289
|
+
loadBalancerId: string;
|
|
290
|
+
region: string;
|
|
291
|
+
account: string;
|
|
292
|
+
application: string;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export interface IClassicListenerDescription extends IClassicListener {
|
|
296
|
+
sslCertificateId?: string;
|
|
297
|
+
sslCertificateName?: string;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export interface ITencentcloudClassicLoadBalancerUpsertCommand extends ITencentcloudLoadBalancerUpsertCommand {
|
|
301
|
+
healthCheck: string;
|
|
302
|
+
healthCheckPath: string;
|
|
303
|
+
healthCheckProtocol: string;
|
|
304
|
+
healthCheckPort: number;
|
|
305
|
+
healthInterval?: number;
|
|
306
|
+
healthTimeout?: number;
|
|
307
|
+
healthyThreshold?: number;
|
|
308
|
+
listeners: IClassicListenerDescription[];
|
|
309
|
+
unhealthyThreshold?: number;
|
|
310
|
+
idleTimeout?: number;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export interface ITencentcloudApplicationLoadBalancerUpsertCommand extends ITencentcloudLoadBalancerUpsertCommand {
|
|
314
|
+
deletionProtection?: boolean;
|
|
315
|
+
idleTimeout?: number;
|
|
316
|
+
listener?: IListenerDescription[];
|
|
317
|
+
listeners: IListenerDescription[];
|
|
318
|
+
targetGroups?: IALBTargetGroupDescription[];
|
|
319
|
+
subnetId: string;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export interface ITencentcloudNetworkLoadBalancerUpsertCommand extends ITencentcloudLoadBalancerUpsertCommand {
|
|
323
|
+
deletionProtection: boolean;
|
|
324
|
+
listeners: IListenerDescription[];
|
|
325
|
+
targetGroups: INLBTargetGroupDescription[];
|
|
326
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import type { ILoadBalancerSourceData } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
import type { IListenerAction, NLBListenerProtocol } from './ITencentcloudLoadBalancer';
|
|
4
|
+
|
|
5
|
+
import type { IListenerRule } from './ITencentcloudLoadBalancer';
|
|
6
|
+
|
|
7
|
+
export interface ITencentcloudContainerServerGroupSourceData {
|
|
8
|
+
detachedInstances: string[];
|
|
9
|
+
isDisabled: boolean;
|
|
10
|
+
name: string;
|
|
11
|
+
region: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ITencentcloudLoadBalancerServerGroupSourceData extends ITencentcloudContainerServerGroupSourceData {
|
|
15
|
+
instances: ITencentcloudLoadBalancerInstanceSourceData[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ITencentcloudTargetGroupServerGroupSourceData extends ITencentcloudContainerServerGroupSourceData {
|
|
19
|
+
instances: ITencentcloudTargetGroupInstanceSourceData[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ITencentcloudInstanceHealthSourceData {
|
|
23
|
+
type: string;
|
|
24
|
+
state: 'InService' | 'OutOfService' | 'Unknown';
|
|
25
|
+
reasonCode: 'ELB' | 'Instance' | 'N/A';
|
|
26
|
+
description: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ITencentcloudTargetHealthSourceData {
|
|
30
|
+
description: string;
|
|
31
|
+
reason: string;
|
|
32
|
+
state: 'initial' | 'healthy' | 'unhealthy' | 'unused' | 'draining';
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface IClassicListenerSourceData {
|
|
36
|
+
instancePort: number;
|
|
37
|
+
instanceProtocol: string;
|
|
38
|
+
loadBalancerPort: number;
|
|
39
|
+
protocol: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface ITencentcloudLoadBalancerSourceData extends ILoadBalancerSourceData {
|
|
43
|
+
id?: string;
|
|
44
|
+
account: string;
|
|
45
|
+
availabilityZones: string[];
|
|
46
|
+
cloudProvider: string;
|
|
47
|
+
createdTime: number;
|
|
48
|
+
dnsname: string;
|
|
49
|
+
loadBalancerName: string;
|
|
50
|
+
loadBalancerType?: string;
|
|
51
|
+
name: string;
|
|
52
|
+
region: string;
|
|
53
|
+
scheme: 'internal' | 'internet-facing';
|
|
54
|
+
securityGroups: string[];
|
|
55
|
+
serverGroups: ITencentcloudLoadBalancerServerGroupSourceData[];
|
|
56
|
+
subnets: string[];
|
|
57
|
+
type: string;
|
|
58
|
+
vpcId: string;
|
|
59
|
+
// Some of the backend in clouddriver returns a vpcid (lowecase) only,
|
|
60
|
+
// and was cached with some of that. Until caches roll off and we are
|
|
61
|
+
// sure clouddriver is cleaed up, leave this dirtiness in here
|
|
62
|
+
vpcid?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface ITencentcloudLoadBalancerInstanceSourceData {
|
|
66
|
+
id: string;
|
|
67
|
+
zone: string;
|
|
68
|
+
health: ITencentcloudInstanceHealthSourceData;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface ITencentcloudTargetGroupInstanceSourceData {
|
|
72
|
+
id: string;
|
|
73
|
+
zone: string;
|
|
74
|
+
health: ITencentcloudTargetHealthSourceData;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface ITencentcloudTargetGroupSourceData {
|
|
78
|
+
account: string;
|
|
79
|
+
attributes: {
|
|
80
|
+
'deregistration_delay.timeout_seconds': number;
|
|
81
|
+
'stickiness.enabled': boolean;
|
|
82
|
+
'stickiness.lb_cookie.duration_seconds': number;
|
|
83
|
+
'stickiness.type': 'lb_cookie';
|
|
84
|
+
'lambda.multi_value_headers.enabled': boolean;
|
|
85
|
+
};
|
|
86
|
+
cloudProvider: string;
|
|
87
|
+
healthCheckIntervalSeconds: number;
|
|
88
|
+
healthCheckPath: string;
|
|
89
|
+
healthCheckPort: string;
|
|
90
|
+
healthCheckProtocol: string;
|
|
91
|
+
healthCheckTimeoutSeconds: number;
|
|
92
|
+
healthyThresholdCount: number;
|
|
93
|
+
instances: string[];
|
|
94
|
+
loadBalancerNames: string[];
|
|
95
|
+
matcher: {
|
|
96
|
+
httpCode: string;
|
|
97
|
+
};
|
|
98
|
+
name: string;
|
|
99
|
+
port: number;
|
|
100
|
+
protocol: string;
|
|
101
|
+
region: string;
|
|
102
|
+
serverGroups: ITencentcloudTargetGroupServerGroupSourceData[];
|
|
103
|
+
targetGroupArn: string;
|
|
104
|
+
targetGroupName: string;
|
|
105
|
+
targetType: string;
|
|
106
|
+
type: string;
|
|
107
|
+
unhealthyThresholdCount: number;
|
|
108
|
+
vpcId: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface IApplicationLoadBalancerCertificateSourceData {
|
|
112
|
+
certificateArn: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface IApplicationLoadBalancerListenerSourceData {
|
|
116
|
+
certificates?: IApplicationLoadBalancerCertificateSourceData[];
|
|
117
|
+
defaultActions: IListenerAction[];
|
|
118
|
+
listenerArn: string;
|
|
119
|
+
loadBalancerName: string;
|
|
120
|
+
port: number;
|
|
121
|
+
protocol: 'HTTP' | 'HTTPS';
|
|
122
|
+
rules: IListenerRule[];
|
|
123
|
+
sslPolicy?: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface IApplicationLoadBalancerSourceData extends ITencentcloudLoadBalancerSourceData {
|
|
127
|
+
ipAddressType: 'ipv4' | 'dualstack';
|
|
128
|
+
listeners: IApplicationLoadBalancerListenerSourceData[];
|
|
129
|
+
loadBalancerArn: string;
|
|
130
|
+
loadBalancerType: 'application';
|
|
131
|
+
state: {
|
|
132
|
+
code: 'active' | 'provisioning' | 'failed';
|
|
133
|
+
reason?: string;
|
|
134
|
+
};
|
|
135
|
+
targetGroups: ITencentcloudTargetGroupSourceData[];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface INetworkLoadBalancerListenerSourceData {
|
|
139
|
+
certificates?: IApplicationLoadBalancerCertificateSourceData[];
|
|
140
|
+
defaultActions: Array<{
|
|
141
|
+
targetGroupName: string;
|
|
142
|
+
type: 'forward';
|
|
143
|
+
}>;
|
|
144
|
+
listenerArn: string;
|
|
145
|
+
loadBalancerName: string;
|
|
146
|
+
port: number;
|
|
147
|
+
protocol: NLBListenerProtocol;
|
|
148
|
+
rules: IListenerRule[];
|
|
149
|
+
sslPolicy?: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface INetworkLoadBalancerSourceData extends ITencentcloudLoadBalancerSourceData {
|
|
153
|
+
ipAddressType: 'ipv4' | 'dualstack';
|
|
154
|
+
listeners: INetworkLoadBalancerListenerSourceData[];
|
|
155
|
+
loadBalancerArn: string;
|
|
156
|
+
loadBalancerType: 'network';
|
|
157
|
+
state: {
|
|
158
|
+
code: 'active' | 'provisioning' | 'failed';
|
|
159
|
+
reason?: string;
|
|
160
|
+
};
|
|
161
|
+
targetGroups: ITencentcloudTargetGroupSourceData[];
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export interface IClassicLoadBalancerSourceData extends ITencentcloudLoadBalancerSourceData {
|
|
165
|
+
healthCheck: {
|
|
166
|
+
healthyThreshold: number;
|
|
167
|
+
interval: number;
|
|
168
|
+
target: string;
|
|
169
|
+
timeout: number;
|
|
170
|
+
unhealthyThreshold: number;
|
|
171
|
+
};
|
|
172
|
+
instances: string[];
|
|
173
|
+
listenerDescriptions: Array<{ listener: IClassicListenerSourceData; policyNames: string[] }>;
|
|
174
|
+
policies: {
|
|
175
|
+
appCookieStickinessPolicies: Array<{
|
|
176
|
+
CookieName: string;
|
|
177
|
+
PolicyName: string;
|
|
178
|
+
}>;
|
|
179
|
+
lbcookieStickinessPolicies: Array<{
|
|
180
|
+
CookieExpirationPeriod: string;
|
|
181
|
+
PolicyName: string;
|
|
182
|
+
}>;
|
|
183
|
+
otherPolicies: any[];
|
|
184
|
+
};
|
|
185
|
+
sourceSecurityGroup: {
|
|
186
|
+
groupName: string;
|
|
187
|
+
ownerAlias: string;
|
|
188
|
+
};
|
|
189
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { IScalingPolicy, IScalingPolicyAlarm, IStepAdjustment } from './IScalingPolicy';
|
|
2
|
+
|
|
3
|
+
export interface IScalingAdjustmentView extends IStepAdjustment {
|
|
4
|
+
operator: string;
|
|
5
|
+
absAdjustment: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface IScalingPolicyAlarmView extends IScalingPolicyAlarm {
|
|
9
|
+
name?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
comparator?: '<' | '>' | '≤' | '≥';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IScalingPolicyView extends IScalingPolicy, IScalingAdjustmentView {
|
|
15
|
+
alarms: IScalingPolicyAlarmView[];
|
|
16
|
+
stepAdjustments: IStepAdjustmentView[];
|
|
17
|
+
operator: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface IStepAdjustmentView extends IScalingAdjustmentView, IStepAdjustment {
|
|
21
|
+
metricIntervalLowerBound: number;
|
|
22
|
+
metricIntervalUpperBound: number;
|
|
23
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { IAccountDetails, IAsg, IServerGroup } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
import type { IScalingPolicyView, ISuspendedProcess } from '.';
|
|
4
|
+
import type { IScalingPolicy } from './IScalingPolicy';
|
|
5
|
+
|
|
6
|
+
export interface ITencentcloudAsg extends IAsg {
|
|
7
|
+
availabilityZones: string[];
|
|
8
|
+
defaultCooldown: number;
|
|
9
|
+
terminationPolicies: string[];
|
|
10
|
+
enabledMetrics: Array<{ metric: string }>;
|
|
11
|
+
vpczoneIdentifier?: string;
|
|
12
|
+
suspendedProcesses?: ISuspendedProcess[];
|
|
13
|
+
zoneSet?: string[];
|
|
14
|
+
terminationPolicySet: string[];
|
|
15
|
+
vpcId: string;
|
|
16
|
+
subnetIdSet: string[];
|
|
17
|
+
instanceCount?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ITencentcloudServerGroup extends IServerGroup {
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
vpcName?: any;
|
|
23
|
+
image?: any;
|
|
24
|
+
scalingPolicies?: IScalingPolicy[];
|
|
25
|
+
targetGroups?: string[];
|
|
26
|
+
asg?: ITencentcloudAsg;
|
|
27
|
+
accountName?: string;
|
|
28
|
+
instanceCount?: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface IScheduledAction {
|
|
32
|
+
scheduledActionId?: string;
|
|
33
|
+
scheduledActionName?: string;
|
|
34
|
+
startTime?: string;
|
|
35
|
+
endTime?: string;
|
|
36
|
+
recurrence: number;
|
|
37
|
+
minSize: number;
|
|
38
|
+
maxSize: number;
|
|
39
|
+
desiredCapacity: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface ITencentcloudServerGroupView extends ITencentcloudServerGroup {
|
|
43
|
+
accountDetails?: IAccountDetails;
|
|
44
|
+
scalingPolicies: IScalingPolicyView[];
|
|
45
|
+
scheduledActions?: IScheduledAction[];
|
|
46
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './ITencentcloudCertificate';
|
|
2
|
+
export * from './ITencentcloudInstance';
|
|
3
|
+
export * from './ITencentcloudLoadBalancer';
|
|
4
|
+
export * from './ITencentcloudLoadBalancerSourceData';
|
|
5
|
+
export * from './ITencentcloudHealth';
|
|
6
|
+
export * from './ITencentcloudScalingPolicy';
|
|
7
|
+
export * from './ITencentcloudServerGroup';
|
|
8
|
+
export * from './IKeyPair';
|
|
9
|
+
export * from './IScalingPolicy';
|
|
10
|
+
export * from './IScalingProcess';
|
|
11
|
+
export * from './ITargetTrackingPolicy';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { $q } from 'ngimport';
|
|
2
|
+
|
|
3
|
+
import { REST } from '@spinnaker/core';
|
|
4
|
+
export interface ITencentcloudSnapshot {
|
|
5
|
+
diskSize: string;
|
|
6
|
+
diskType: string;
|
|
7
|
+
diskUsage: 'SYSTEM_DISK' | 'DATA_DISK';
|
|
8
|
+
snapshotId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ITencentcloudImage {
|
|
11
|
+
accounts: string[];
|
|
12
|
+
images: {
|
|
13
|
+
[region: string]: string[];
|
|
14
|
+
};
|
|
15
|
+
imgIds: {
|
|
16
|
+
[region: string]: string[];
|
|
17
|
+
};
|
|
18
|
+
attributes: {
|
|
19
|
+
createdTime?: string;
|
|
20
|
+
creationDate?: string;
|
|
21
|
+
snapshotSet?: ITencentcloudSnapshot[];
|
|
22
|
+
osPlatform: string;
|
|
23
|
+
};
|
|
24
|
+
imageName: string;
|
|
25
|
+
tags: {
|
|
26
|
+
[tag: string]: string;
|
|
27
|
+
};
|
|
28
|
+
tagsByImageId: {
|
|
29
|
+
[imageId: string]: ITencentcloudImage['tags'];
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export class TencentcloudImageReader {
|
|
34
|
+
public findImages(params: { q: string; region?: string }): PromiseLike<ITencentcloudImage[]> {
|
|
35
|
+
if (!params.q || params.q.length < 3) {
|
|
36
|
+
return $q.when([{ message: 'Please enter at least 3 characters...', disabled: true }]) as any;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return REST('/images/find')
|
|
40
|
+
.query({ ...params, provider: 'tencentcloud' })
|
|
41
|
+
.get()
|
|
42
|
+
.catch(() => [] as ITencentcloudImage[]);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public getImage(name: string, region: string, credentials: string): PromiseLike<ITencentcloudImage> {
|
|
46
|
+
return REST('/images')
|
|
47
|
+
.path(credentials, region, name)
|
|
48
|
+
.query({ provider: 'tencentcloud' })
|
|
49
|
+
.get()
|
|
50
|
+
.then((results: any[]) => (results && results.length ? results[0] : null))
|
|
51
|
+
.catch(() => null as ITencentcloudImage);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './image.reader';
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { REST } from '@spinnaker/core';
|
|
2
|
+
import type { IKeyPair } from '../domain';
|
|
3
|
+
|
|
4
|
+
export class KeyPairsReader {
|
|
5
|
+
public static listKeyPairs(): PromiseLike<IKeyPair[]> {
|
|
6
|
+
return REST('/keyPairs')
|
|
7
|
+
.useCache()
|
|
8
|
+
.get()
|
|
9
|
+
.then((keyPairs: IKeyPair[]) => keyPairs.sort((a, b) => a.keyName.localeCompare(b.keyName)));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './KeyPairsReader';
|