@alauda-fe/workload-util-shared 0.0.1
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/esm2022/alauda-fe-workload-util-shared.mjs +5 -0
- package/esm2022/index.mjs +6 -0
- package/esm2022/lib/directives/index.mjs +3 -0
- package/esm2022/lib/directives/oam-resource-disabled-container.directive.mjs +53 -0
- package/esm2022/lib/directives/sync-control.directive.mjs +52 -0
- package/esm2022/lib/pipes/index.mjs +4 -0
- package/esm2022/lib/pipes/is-oam-resource.pipe.mjs +17 -0
- package/esm2022/lib/pipes/range.pipe.mjs +17 -0
- package/esm2022/lib/pipes/short-num.pipe.mjs +15 -0
- package/esm2022/lib/services/cluster-api.service.mjs +93 -0
- package/esm2022/lib/services/feature-gate.service.mjs +50 -0
- package/esm2022/lib/services/index.mjs +6 -0
- package/esm2022/lib/services/pod-util.service.mjs +70 -0
- package/esm2022/lib/services/resource-quota.service.mjs +116 -0
- package/esm2022/lib/services/terminal.service.mjs +46 -0
- package/esm2022/lib/typings/account.mjs +2 -0
- package/esm2022/lib/typings/backend-api.mjs +7 -0
- package/esm2022/lib/typings/batch-action.type.mjs +2 -0
- package/esm2022/lib/typings/form.mjs +2 -0
- package/esm2022/lib/typings/helpers.mjs +14 -0
- package/esm2022/lib/typings/index.mjs +10 -0
- package/esm2022/lib/typings/k8s-form-model.mjs +12 -0
- package/esm2022/lib/typings/k8s-resource-definitions/acp-resource-definition.mjs +258 -0
- package/esm2022/lib/typings/k8s-resource-definitions/alu-resource-definition.mjs +281 -0
- package/esm2022/lib/typings/k8s-resource-definitions/index.mjs +142 -0
- package/esm2022/lib/typings/k8s.mjs +143 -0
- package/esm2022/lib/typings/status.mjs +269 -0
- package/esm2022/lib/utils/code-editor-config.mjs +2 -0
- package/esm2022/lib/utils/constants.mjs +61 -0
- package/esm2022/lib/utils/crd.mjs +36 -0
- package/esm2022/lib/utils/format-number.mjs +227 -0
- package/esm2022/lib/utils/helpers.mjs +27 -0
- package/esm2022/lib/utils/index.mjs +14 -0
- package/esm2022/lib/utils/k8s-util.service.mjs +28 -0
- package/esm2022/lib/utils/patterns.mjs +140 -0
- package/esm2022/lib/utils/pod-util.mjs +75 -0
- package/esm2022/lib/utils/resource-status.mjs +86 -0
- package/esm2022/lib/utils/resources-config-util.mjs +28 -0
- package/esm2022/lib/utils/status.mjs +84 -0
- package/esm2022/lib/utils/validator.mjs +11 -0
- package/esm2022/lib/utils/workspace.mjs +25 -0
- package/index.d.ts +5 -0
- package/lib/directives/index.d.ts +2 -0
- package/lib/directives/oam-resource-disabled-container.directive.d.ts +17 -0
- package/lib/directives/sync-control.directive.d.ts +14 -0
- package/lib/pipes/index.d.ts +3 -0
- package/lib/pipes/is-oam-resource.pipe.d.ts +9 -0
- package/lib/pipes/range.pipe.d.ts +7 -0
- package/lib/pipes/short-num.pipe.d.ts +7 -0
- package/lib/services/cluster-api.service.d.ts +38 -0
- package/lib/services/feature-gate.service.d.ts +38 -0
- package/lib/services/index.d.ts +5 -0
- package/lib/services/pod-util.service.d.ts +18 -0
- package/lib/services/resource-quota.service.d.ts +25 -0
- package/lib/services/terminal.service.d.ts +15 -0
- package/lib/typings/account.d.ts +17 -0
- package/lib/typings/backend-api.d.ts +220 -0
- package/lib/typings/batch-action.type.d.ts +35 -0
- package/lib/typings/form.d.ts +10 -0
- package/lib/typings/helpers.d.ts +45 -0
- package/lib/typings/index.d.ts +9 -0
- package/lib/typings/k8s-form-model.d.ts +128 -0
- package/lib/typings/k8s-resource-definitions/acp-resource-definition.d.ts +242 -0
- package/lib/typings/k8s-resource-definitions/alu-resource-definition.d.ts +269 -0
- package/lib/typings/k8s-resource-definitions/index.d.ts +1911 -0
- package/lib/typings/k8s.d.ts +1147 -0
- package/lib/typings/status.d.ts +252 -0
- package/lib/utils/code-editor-config.d.ts +1 -0
- package/lib/utils/constants.d.ts +57 -0
- package/lib/utils/crd.d.ts +21 -0
- package/lib/utils/format-number.d.ts +11 -0
- package/lib/utils/helpers.d.ts +13 -0
- package/lib/utils/index.d.ts +13 -0
- package/lib/utils/k8s-util.service.d.ts +8 -0
- package/lib/utils/patterns.d.ts +132 -0
- package/lib/utils/pod-util.d.ts +19 -0
- package/lib/utils/resource-status.d.ts +8 -0
- package/lib/utils/resources-config-util.d.ts +22 -0
- package/lib/utils/status.d.ts +3 -0
- package/lib/utils/validator.d.ts +4 -0
- package/lib/utils/workspace.d.ts +14 -0
- package/package.json +36 -0
|
@@ -0,0 +1,1147 @@
|
|
|
1
|
+
import { EnvVar, KubernetesResource, Probe, Condition, StringMap, WorkloadStatus, LabelSelector } from '@alauda-fe/common';
|
|
2
|
+
import { Selector } from '@alauda-fe/crd-form';
|
|
3
|
+
import { OamAppOriginalStatusEnum } from './status';
|
|
4
|
+
export declare enum SERVICE_APP_PROTOCOL {
|
|
5
|
+
tcp = "TCP",
|
|
6
|
+
udp = "UDP",
|
|
7
|
+
http = "HTTP",
|
|
8
|
+
https = "HTTPS",
|
|
9
|
+
http2 = "HTTP2",
|
|
10
|
+
grpc = "gRPC"
|
|
11
|
+
}
|
|
12
|
+
export interface AdvancedAPIVolumeSpec {
|
|
13
|
+
storageClassName?: string;
|
|
14
|
+
accessModes: string[];
|
|
15
|
+
resources: {
|
|
16
|
+
requests: {
|
|
17
|
+
storage: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
volumeMode?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface AdvancedApiVolume extends KubernetesResource {
|
|
23
|
+
spec?: AdvancedAPIVolumeSpec;
|
|
24
|
+
status?: {
|
|
25
|
+
phase: string;
|
|
26
|
+
progress: string;
|
|
27
|
+
capacity?: {
|
|
28
|
+
storage: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface Topology extends KubernetesResource {
|
|
33
|
+
spec: {
|
|
34
|
+
owner?: KubernetesResource;
|
|
35
|
+
resources?: KubernetesResource[];
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export interface OamApplicationWorkflow {
|
|
39
|
+
steps: OamApplicationWorkflowStep[];
|
|
40
|
+
}
|
|
41
|
+
export interface OamApplication extends KubernetesResource {
|
|
42
|
+
spec: {
|
|
43
|
+
components: OamComponent[];
|
|
44
|
+
workflow?: OamApplicationWorkflow;
|
|
45
|
+
};
|
|
46
|
+
status?: OamApplicationStatus;
|
|
47
|
+
}
|
|
48
|
+
export interface OamComponent {
|
|
49
|
+
name: string;
|
|
50
|
+
type: string;
|
|
51
|
+
properties?: any;
|
|
52
|
+
traits: OamTrait[];
|
|
53
|
+
}
|
|
54
|
+
export declare enum OamTraitTypeInside {
|
|
55
|
+
Scaler = "scaler",
|
|
56
|
+
Ingress = "ingress",
|
|
57
|
+
Hpa = "hpa",
|
|
58
|
+
Env = "env",
|
|
59
|
+
Healthcheck = "healthcheck",
|
|
60
|
+
Monitor = "monitor",
|
|
61
|
+
Patch = "generic-patch"
|
|
62
|
+
}
|
|
63
|
+
export interface OamTrait {
|
|
64
|
+
type: string;
|
|
65
|
+
properties: OamTraitScaler | OamTraitIngress | OamTraitHpa | OamTraitEnv | OamTraitMonitor;
|
|
66
|
+
}
|
|
67
|
+
export declare enum ScalerActionEnum {
|
|
68
|
+
Start = "start",
|
|
69
|
+
Stop = "stop"
|
|
70
|
+
}
|
|
71
|
+
export interface OamTraitScaler {
|
|
72
|
+
action?: ScalerActionEnum;
|
|
73
|
+
replicas?: number;
|
|
74
|
+
}
|
|
75
|
+
export declare enum OamTraitIngressType {
|
|
76
|
+
HTTP = "http",
|
|
77
|
+
HTTPS = "https"
|
|
78
|
+
}
|
|
79
|
+
export interface OamTraitIngress {
|
|
80
|
+
domain?: string;
|
|
81
|
+
type?: OamTraitIngressType;
|
|
82
|
+
tls?: string;
|
|
83
|
+
tlsType?: string;
|
|
84
|
+
http?: {
|
|
85
|
+
[x: string]: number;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export interface OamTraitHpaMetrics {
|
|
89
|
+
type: string;
|
|
90
|
+
name: string;
|
|
91
|
+
value: string;
|
|
92
|
+
describedObject?: HpaIndicatedDescribedObject;
|
|
93
|
+
}
|
|
94
|
+
export declare enum OamTraitMonitorSourceSchemeType {
|
|
95
|
+
HTTP = "http",
|
|
96
|
+
HTTPS = "https",
|
|
97
|
+
TCP = "tcp"
|
|
98
|
+
}
|
|
99
|
+
export interface HpaIndicatedDescribedObject {
|
|
100
|
+
apiVersion: string;
|
|
101
|
+
kind: string;
|
|
102
|
+
name: string;
|
|
103
|
+
}
|
|
104
|
+
export interface OamTraitMonitorSource {
|
|
105
|
+
path: string;
|
|
106
|
+
scheme: OamTraitMonitorSourceSchemeType;
|
|
107
|
+
port: number;
|
|
108
|
+
interval: number;
|
|
109
|
+
}
|
|
110
|
+
export interface OamTraitMonitor {
|
|
111
|
+
sources: OamTraitMonitorSource[];
|
|
112
|
+
metrics: OamTraitMonitorMetric[];
|
|
113
|
+
}
|
|
114
|
+
export interface OamTraitMonitorMetric {
|
|
115
|
+
uid: string;
|
|
116
|
+
title: string;
|
|
117
|
+
description?: string;
|
|
118
|
+
name: string;
|
|
119
|
+
unit: string;
|
|
120
|
+
expression: string;
|
|
121
|
+
}
|
|
122
|
+
export interface OamTraitHpaScalePolicy {
|
|
123
|
+
type: 'Percent' | 'Pods';
|
|
124
|
+
value: number;
|
|
125
|
+
stabilizationWindowSeconds: number;
|
|
126
|
+
}
|
|
127
|
+
export interface OamTraitHpa {
|
|
128
|
+
maxReplicas: number;
|
|
129
|
+
minReplicas: number;
|
|
130
|
+
metrics: OamTraitHpaMetrics[];
|
|
131
|
+
scalePolicy?: {
|
|
132
|
+
up?: OamTraitHpaScalePolicy;
|
|
133
|
+
down?: OamTraitHpaScalePolicy;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
export interface OamTraitHealthCheck {
|
|
137
|
+
livenessProbe?: Probe;
|
|
138
|
+
readinessProbe?: Probe;
|
|
139
|
+
}
|
|
140
|
+
export interface OamTraitEnv {
|
|
141
|
+
env?: EnvVar[];
|
|
142
|
+
}
|
|
143
|
+
export declare enum OamComponentVolumeTypeEnum {
|
|
144
|
+
pvc = "pvc",
|
|
145
|
+
configMap = "configMap",
|
|
146
|
+
secret = "secret",
|
|
147
|
+
emptyDir = "emptyDir",
|
|
148
|
+
oamConfig = "oamConfig"
|
|
149
|
+
}
|
|
150
|
+
export interface OamComponentVolume {
|
|
151
|
+
name: string;
|
|
152
|
+
mountPath: string;
|
|
153
|
+
type: OamComponentVolumeTypeEnum;
|
|
154
|
+
isAppResource?: boolean;
|
|
155
|
+
defaultMode?: number;
|
|
156
|
+
claimName?: string;
|
|
157
|
+
cmName?: string;
|
|
158
|
+
secretName?: string;
|
|
159
|
+
items?: OamComponentVolumeKeyPath[];
|
|
160
|
+
medium?: '' | 'Memory';
|
|
161
|
+
}
|
|
162
|
+
export interface OamComponentVolumeModel {
|
|
163
|
+
name: string;
|
|
164
|
+
mountPath: string;
|
|
165
|
+
type: OamComponentVolumeTypeEnum;
|
|
166
|
+
isAppResource?: boolean;
|
|
167
|
+
defaultMode?: number;
|
|
168
|
+
claimName?: string;
|
|
169
|
+
emptyDirName?: string;
|
|
170
|
+
oamConfig?: OamApplicationWorkflowStepConfig;
|
|
171
|
+
items?: OamComponentVolumeKeyPath[];
|
|
172
|
+
medium?: '' | 'Memory';
|
|
173
|
+
}
|
|
174
|
+
export interface OamComponentVolumeKeyPath {
|
|
175
|
+
key: string;
|
|
176
|
+
path: string;
|
|
177
|
+
mode: number;
|
|
178
|
+
}
|
|
179
|
+
export declare enum PortProtocol {
|
|
180
|
+
Tcp = "tcp",
|
|
181
|
+
Udp = "udp",
|
|
182
|
+
Http = "http",
|
|
183
|
+
Https = "https",
|
|
184
|
+
http2 = "http2",
|
|
185
|
+
grpc = "grpc"
|
|
186
|
+
}
|
|
187
|
+
export declare enum PortProtocolLabel {
|
|
188
|
+
Tcp = "TCP",
|
|
189
|
+
Udp = "UDP",
|
|
190
|
+
Http = "HTTP",
|
|
191
|
+
Https = "HTTPS",
|
|
192
|
+
http2 = "HTTPS",
|
|
193
|
+
grpc = "gRPC"
|
|
194
|
+
}
|
|
195
|
+
export declare enum PortType {
|
|
196
|
+
Internal = "internal",
|
|
197
|
+
External = "external"
|
|
198
|
+
}
|
|
199
|
+
export interface OamComponentWebServicePort {
|
|
200
|
+
protocol: PortProtocol;
|
|
201
|
+
port: number;
|
|
202
|
+
type: PortType;
|
|
203
|
+
}
|
|
204
|
+
export interface OamComponentWebService {
|
|
205
|
+
image: string;
|
|
206
|
+
imagePullPolicy?: string;
|
|
207
|
+
imagePullSecrets?: string[];
|
|
208
|
+
ports?: OamComponentWebServicePort[];
|
|
209
|
+
addRevisionLabel?: boolean;
|
|
210
|
+
cmd?: string[];
|
|
211
|
+
env?: EnvVar[];
|
|
212
|
+
cpu?: string;
|
|
213
|
+
memory?: string;
|
|
214
|
+
volumes?: OamComponentVolume[];
|
|
215
|
+
}
|
|
216
|
+
export interface OamApplicationStatusService {
|
|
217
|
+
name: string;
|
|
218
|
+
workloadDefinition: {
|
|
219
|
+
apiVersion: string;
|
|
220
|
+
kind: string;
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
export interface OamApplicationStatus {
|
|
224
|
+
status: string;
|
|
225
|
+
latestRevision?: {
|
|
226
|
+
name: string;
|
|
227
|
+
revision: number;
|
|
228
|
+
revisionHash: string;
|
|
229
|
+
};
|
|
230
|
+
services?: OamApplicationStatusService[];
|
|
231
|
+
}
|
|
232
|
+
export interface OamAppStatus extends KubernetesResource {
|
|
233
|
+
spec?: OamAppStatusSpec;
|
|
234
|
+
}
|
|
235
|
+
export interface OamAppStatusSpec {
|
|
236
|
+
appcreatetime: string;
|
|
237
|
+
appupdatetime: string;
|
|
238
|
+
components: OamAppStatusSpecComponent[];
|
|
239
|
+
reason: string;
|
|
240
|
+
status: OamAppOriginalStatusEnum;
|
|
241
|
+
storages?: OamAppStatusSpecStorages;
|
|
242
|
+
}
|
|
243
|
+
export interface OamAppStatusSpecStorages {
|
|
244
|
+
[key: string]: {
|
|
245
|
+
name: string;
|
|
246
|
+
type: string;
|
|
247
|
+
resizeable: boolean;
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
export interface OamAppStatusSpecComponent {
|
|
251
|
+
name: string;
|
|
252
|
+
reason: string;
|
|
253
|
+
revision: string;
|
|
254
|
+
status: OamAppOriginalStatusEnum;
|
|
255
|
+
alerts?: number;
|
|
256
|
+
serviceAddresses?: {
|
|
257
|
+
internal: Array<{
|
|
258
|
+
address: string;
|
|
259
|
+
}>;
|
|
260
|
+
external: Array<{
|
|
261
|
+
address: string;
|
|
262
|
+
}>;
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
export interface OamComponentDefinition extends KubernetesResource {
|
|
266
|
+
spec?: OamComponentDefinitionSpec;
|
|
267
|
+
status?: OamDefinitionStatus;
|
|
268
|
+
}
|
|
269
|
+
export interface OamComponentDefinitionSpec {
|
|
270
|
+
schematic: {
|
|
271
|
+
cure: {
|
|
272
|
+
template: string;
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
workload: {
|
|
276
|
+
definition: {
|
|
277
|
+
apiVersion: string;
|
|
278
|
+
kind: string;
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
export interface OamTraitDefinition extends KubernetesResource {
|
|
283
|
+
spec?: OamTraitDefinitionSpec;
|
|
284
|
+
status?: OamDefinitionStatus;
|
|
285
|
+
}
|
|
286
|
+
export interface OamTraitDefinitionSpec {
|
|
287
|
+
appliesToWorkloads: string[];
|
|
288
|
+
conflictsWith?: string[];
|
|
289
|
+
podDisruptive?: boolean;
|
|
290
|
+
schematic?: {
|
|
291
|
+
spec: {
|
|
292
|
+
template: string;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
export interface OamDefinitionStatus {
|
|
297
|
+
configMapRef?: string;
|
|
298
|
+
}
|
|
299
|
+
export interface OamApplicationRevisionSpec {
|
|
300
|
+
application: OamApplication;
|
|
301
|
+
}
|
|
302
|
+
export interface OamApplicationRevision extends KubernetesResource {
|
|
303
|
+
spec?: OamApplicationRevisionSpec;
|
|
304
|
+
}
|
|
305
|
+
export declare enum WorkflowStepType {
|
|
306
|
+
ApplyStorages = "apply-storages",
|
|
307
|
+
ApplyConfigs = "apply-configs"
|
|
308
|
+
}
|
|
309
|
+
export interface OamApplicationWorkflowStep {
|
|
310
|
+
name: string;
|
|
311
|
+
type: string;
|
|
312
|
+
properties?: {
|
|
313
|
+
storages?: OamApplicationWorkflowStepStorage[];
|
|
314
|
+
configs?: OamApplicationWorkflowStepConfig[];
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
export interface OamApplicationWorkflowStepStorage {
|
|
318
|
+
name: string;
|
|
319
|
+
size?: string;
|
|
320
|
+
type?: string;
|
|
321
|
+
cluster?: string;
|
|
322
|
+
stepType?: string;
|
|
323
|
+
stepName?: string;
|
|
324
|
+
}
|
|
325
|
+
export interface OamApplicationWorkflowStepConfig {
|
|
326
|
+
name: string;
|
|
327
|
+
type?: string;
|
|
328
|
+
data?: StringMap;
|
|
329
|
+
cluster?: string;
|
|
330
|
+
stepType?: string;
|
|
331
|
+
stepName?: string;
|
|
332
|
+
}
|
|
333
|
+
export interface AlaudaBucketRequest extends KubernetesResource {
|
|
334
|
+
apiVersion: 'cosi.alauda.io/v1alpha1';
|
|
335
|
+
kind: 'AlaudaBucketRequest';
|
|
336
|
+
spec: {
|
|
337
|
+
bucketClassName: string;
|
|
338
|
+
defaultBucketAccess: {
|
|
339
|
+
name: string;
|
|
340
|
+
className: string;
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
status?: {
|
|
344
|
+
bucketName: string;
|
|
345
|
+
endpoint: string;
|
|
346
|
+
phase: 'Available' | 'Pending';
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
export interface ClusterModule extends KubernetesResource {
|
|
350
|
+
spec?: {
|
|
351
|
+
version?: string;
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
export interface BucketAccessClass extends KubernetesResource {
|
|
355
|
+
policyActionsConfigMap: {
|
|
356
|
+
namespace: string;
|
|
357
|
+
name: string;
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
export interface BucketAccessRequest extends KubernetesResource {
|
|
361
|
+
apiVersion: 'objectstorage.k8s.io/v1alpha1';
|
|
362
|
+
kind: 'BucketAccessRequest';
|
|
363
|
+
spec: {
|
|
364
|
+
bucketAccessClassName: string;
|
|
365
|
+
bucketRequestName: string;
|
|
366
|
+
};
|
|
367
|
+
status: {
|
|
368
|
+
accessGranted: boolean;
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
export interface GatewayClassStatus {
|
|
372
|
+
conditions?: Condition[];
|
|
373
|
+
}
|
|
374
|
+
export interface GatewayClass extends KubernetesResource {
|
|
375
|
+
spec: {
|
|
376
|
+
controllerName: string;
|
|
377
|
+
parametersRef?: {
|
|
378
|
+
group: string;
|
|
379
|
+
kind: string;
|
|
380
|
+
name: string;
|
|
381
|
+
namespace: string;
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
status?: GatewayClassStatus;
|
|
385
|
+
}
|
|
386
|
+
export type GatewayListenerProtocol = 'HTTP' | 'HTTPS' | 'TCP' | 'UDP';
|
|
387
|
+
export interface GatewayListener {
|
|
388
|
+
allowedRoutes: {
|
|
389
|
+
namespaces: {
|
|
390
|
+
from: string;
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
hostname?: string;
|
|
394
|
+
name: string;
|
|
395
|
+
port: number;
|
|
396
|
+
protocol: GatewayListenerProtocol;
|
|
397
|
+
tls?: {
|
|
398
|
+
mode: 'Terminate';
|
|
399
|
+
certificateRefs: Array<{
|
|
400
|
+
kind: 'Secret';
|
|
401
|
+
name: string;
|
|
402
|
+
namespace: string;
|
|
403
|
+
}>;
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
export interface GatewayStatusAddress {
|
|
407
|
+
type: 'Hostname' | 'IPAddress';
|
|
408
|
+
value: string;
|
|
409
|
+
}
|
|
410
|
+
export interface GatewayStatusListener {
|
|
411
|
+
name: string;
|
|
412
|
+
attachedRoutes: number;
|
|
413
|
+
}
|
|
414
|
+
export interface GatewayStatus {
|
|
415
|
+
addresses: GatewayStatusAddress[];
|
|
416
|
+
conditions?: Condition[];
|
|
417
|
+
listeners?: GatewayStatusListener[];
|
|
418
|
+
}
|
|
419
|
+
export interface Gateway extends KubernetesResource {
|
|
420
|
+
spec: {
|
|
421
|
+
gatewayClassName: string;
|
|
422
|
+
listeners?: GatewayListener[];
|
|
423
|
+
};
|
|
424
|
+
status?: GatewayStatus;
|
|
425
|
+
}
|
|
426
|
+
export interface GatewayPathMatch {
|
|
427
|
+
type: 'Exact' | 'PathPrefix' | 'RegularExpression';
|
|
428
|
+
value: string;
|
|
429
|
+
}
|
|
430
|
+
export interface GatewayNameValueMatch {
|
|
431
|
+
type: 'Exact' | 'RegularExpression';
|
|
432
|
+
name: string;
|
|
433
|
+
value: string;
|
|
434
|
+
}
|
|
435
|
+
export type GatewayMethod = 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';
|
|
436
|
+
export interface GatewayRouteRuleMatch {
|
|
437
|
+
path?: GatewayPathMatch;
|
|
438
|
+
headers?: GatewayNameValueMatch[];
|
|
439
|
+
queryParams?: GatewayNameValueMatch[];
|
|
440
|
+
method?: GatewayMethod;
|
|
441
|
+
}
|
|
442
|
+
export interface GatewayRouteRuleBackendRef {
|
|
443
|
+
kind: 'Service';
|
|
444
|
+
name: string;
|
|
445
|
+
namespace: string;
|
|
446
|
+
port: number;
|
|
447
|
+
weight: number;
|
|
448
|
+
}
|
|
449
|
+
export interface GatewayHeader {
|
|
450
|
+
name: string;
|
|
451
|
+
value: string;
|
|
452
|
+
}
|
|
453
|
+
export interface GatewayRequestHeaderFilter {
|
|
454
|
+
set?: GatewayHeader[];
|
|
455
|
+
add?: GatewayHeader[];
|
|
456
|
+
remove?: string[];
|
|
457
|
+
}
|
|
458
|
+
export interface GatewayPathModifier {
|
|
459
|
+
type: 'ReplaceFullPath' | 'ReplacePrefixMatch';
|
|
460
|
+
replaceFullPath?: string;
|
|
461
|
+
replacePrefixMatch?: string;
|
|
462
|
+
}
|
|
463
|
+
export interface GatewayRequestRedirectFilter {
|
|
464
|
+
scheme?: 'http' | 'https';
|
|
465
|
+
hostname?: string;
|
|
466
|
+
path?: GatewayPathModifier;
|
|
467
|
+
port?: number;
|
|
468
|
+
statusCode?: 301 | 302;
|
|
469
|
+
}
|
|
470
|
+
export interface GatewayURLRewriteFilter {
|
|
471
|
+
hostname?: string;
|
|
472
|
+
path?: GatewayPathModifier;
|
|
473
|
+
}
|
|
474
|
+
export interface GatewayRouteRuleFilter {
|
|
475
|
+
type: 'RequestHeaderModifier' | 'RequestRedirect' | 'URLRewrite';
|
|
476
|
+
requestHeaderModifier?: GatewayRequestHeaderFilter;
|
|
477
|
+
requestRedirect?: GatewayRequestRedirectFilter;
|
|
478
|
+
urlRewrite?: GatewayURLRewriteFilter;
|
|
479
|
+
}
|
|
480
|
+
export interface GatewayRouteRule {
|
|
481
|
+
matches?: GatewayRouteRuleMatch[];
|
|
482
|
+
filters?: GatewayRouteRuleFilter[];
|
|
483
|
+
backendRefs: GatewayRouteRuleBackendRef[];
|
|
484
|
+
}
|
|
485
|
+
export interface GatewayRouteParentRef {
|
|
486
|
+
kind: 'Gateway';
|
|
487
|
+
namespace: string;
|
|
488
|
+
name: string;
|
|
489
|
+
sectionName: string;
|
|
490
|
+
}
|
|
491
|
+
export interface GatewayRoute extends KubernetesResource {
|
|
492
|
+
spec: {
|
|
493
|
+
hostnames: [string];
|
|
494
|
+
parentRefs: [GatewayRouteParentRef];
|
|
495
|
+
rules: [GatewayRouteRule];
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
export interface GitSource {
|
|
499
|
+
url: string;
|
|
500
|
+
secret: string;
|
|
501
|
+
revision: string;
|
|
502
|
+
}
|
|
503
|
+
export interface BuildSource {
|
|
504
|
+
type: string;
|
|
505
|
+
git: GitSource;
|
|
506
|
+
contextDir: string;
|
|
507
|
+
}
|
|
508
|
+
export interface BuildTask {
|
|
509
|
+
name: string;
|
|
510
|
+
kind: string;
|
|
511
|
+
}
|
|
512
|
+
export interface ParamValue {
|
|
513
|
+
name: string;
|
|
514
|
+
value: string;
|
|
515
|
+
}
|
|
516
|
+
export interface BuildOutput {
|
|
517
|
+
insecure?: boolean;
|
|
518
|
+
image: string;
|
|
519
|
+
pushSecret: string;
|
|
520
|
+
annotations?: Record<string, string>;
|
|
521
|
+
labels?: Record<string, string>;
|
|
522
|
+
}
|
|
523
|
+
export interface BuildCondition {
|
|
524
|
+
lastTransitionTime: string;
|
|
525
|
+
message: string;
|
|
526
|
+
reason: string;
|
|
527
|
+
status: string;
|
|
528
|
+
type: string;
|
|
529
|
+
}
|
|
530
|
+
export interface AppBuildSpec {
|
|
531
|
+
source: BuildSource;
|
|
532
|
+
task: BuildTask;
|
|
533
|
+
paramValues: ParamValue[];
|
|
534
|
+
output: BuildOutput;
|
|
535
|
+
timeout?: string;
|
|
536
|
+
}
|
|
537
|
+
export interface AppBuildStatus {
|
|
538
|
+
ready: boolean;
|
|
539
|
+
conditions: BuildCondition[];
|
|
540
|
+
}
|
|
541
|
+
export interface AppBuild extends KubernetesResource {
|
|
542
|
+
spec: AppBuildSpec;
|
|
543
|
+
status?: AppBuildStatus;
|
|
544
|
+
}
|
|
545
|
+
export interface AppBuildRunSpec {
|
|
546
|
+
build: {
|
|
547
|
+
name: string;
|
|
548
|
+
};
|
|
549
|
+
output: {
|
|
550
|
+
image: string;
|
|
551
|
+
pushSecret: string;
|
|
552
|
+
annotations: Record<string, string>;
|
|
553
|
+
labels: Record<string, string>;
|
|
554
|
+
};
|
|
555
|
+
paramValues: Array<{
|
|
556
|
+
name: string;
|
|
557
|
+
value: string;
|
|
558
|
+
}>;
|
|
559
|
+
state: string;
|
|
560
|
+
timeout: string;
|
|
561
|
+
}
|
|
562
|
+
export interface AppBuildRunStatus {
|
|
563
|
+
buildSpec: {
|
|
564
|
+
output: {
|
|
565
|
+
image: string;
|
|
566
|
+
};
|
|
567
|
+
source: {
|
|
568
|
+
contextDir: string;
|
|
569
|
+
};
|
|
570
|
+
task: {
|
|
571
|
+
name: string;
|
|
572
|
+
kind: string;
|
|
573
|
+
};
|
|
574
|
+
};
|
|
575
|
+
completedAt: string;
|
|
576
|
+
taskRunName: string;
|
|
577
|
+
conditions: Array<{
|
|
578
|
+
lastTransitionTime: string;
|
|
579
|
+
message: string;
|
|
580
|
+
reason: string;
|
|
581
|
+
status: string;
|
|
582
|
+
type: string;
|
|
583
|
+
}>;
|
|
584
|
+
output: {
|
|
585
|
+
digest: string;
|
|
586
|
+
size: number;
|
|
587
|
+
};
|
|
588
|
+
startedAt: string;
|
|
589
|
+
}
|
|
590
|
+
export interface AppBuildRun extends KubernetesResource {
|
|
591
|
+
spec: AppBuildRunSpec;
|
|
592
|
+
status: AppBuildRunStatus;
|
|
593
|
+
}
|
|
594
|
+
export interface Application extends KubernetesResource {
|
|
595
|
+
spec?: ApplicationSpec;
|
|
596
|
+
status?: ApplicationStatus;
|
|
597
|
+
}
|
|
598
|
+
export interface ApplicationStatus {
|
|
599
|
+
state: ApplicationStateEnum;
|
|
600
|
+
totalComponents: number;
|
|
601
|
+
conditions?: Condition[];
|
|
602
|
+
workloadsStatus?: {
|
|
603
|
+
pending?: number;
|
|
604
|
+
ready?: number;
|
|
605
|
+
stopped?: number;
|
|
606
|
+
workloads?: WorkloadStatus[];
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
export interface ApplicationSpec {
|
|
610
|
+
componentKinds: GroupKind[];
|
|
611
|
+
assemblyPhase?: ApplicationPhaseEnum;
|
|
612
|
+
selector?: LabelSelector;
|
|
613
|
+
descriptor?: any;
|
|
614
|
+
}
|
|
615
|
+
export interface GroupKind {
|
|
616
|
+
kind: string;
|
|
617
|
+
group: string;
|
|
618
|
+
}
|
|
619
|
+
export declare enum ApplicationStateEnum {
|
|
620
|
+
Pending = "Pending",
|
|
621
|
+
PartialRunning = "PartialRunning",
|
|
622
|
+
Running = "Running",
|
|
623
|
+
Stopped = "Stopped",
|
|
624
|
+
Empty = "Empty"
|
|
625
|
+
}
|
|
626
|
+
export declare enum ApplicationPhaseEnum {
|
|
627
|
+
Succeeded = "Succeeded",
|
|
628
|
+
Failed = "Failed",
|
|
629
|
+
Pending = "Pending"
|
|
630
|
+
}
|
|
631
|
+
export interface PodAutoscaler extends KubernetesResource {
|
|
632
|
+
spec: {
|
|
633
|
+
hpa?: HorizontalPodAutoscaler;
|
|
634
|
+
cronHpa?: CronHorizontalPodAutoscaler;
|
|
635
|
+
vpa?: VerticalPodAutoscaler;
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
export interface HpaSpecBehaviorPolicy {
|
|
639
|
+
type: 'Pods' | 'Percent';
|
|
640
|
+
value: number;
|
|
641
|
+
periodSeconds: number;
|
|
642
|
+
}
|
|
643
|
+
export interface HpaSpecBehavior {
|
|
644
|
+
scaleDown: {
|
|
645
|
+
stabilizationWindowSeconds: number;
|
|
646
|
+
policies: HpaSpecBehaviorPolicy[];
|
|
647
|
+
};
|
|
648
|
+
scaleUp: {
|
|
649
|
+
stabilizationWindowSeconds: number;
|
|
650
|
+
policies: HpaSpecBehaviorPolicy[];
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
export interface HorizontalPodAutoscalerSpec {
|
|
654
|
+
maxReplicas?: number;
|
|
655
|
+
minReplicas?: number;
|
|
656
|
+
targetCPUUtilizationPercentage?: string;
|
|
657
|
+
scaleTargetRef?: CrossVersionObjectReference;
|
|
658
|
+
metrics?: HpaSpecMetric[];
|
|
659
|
+
behavior?: HpaSpecBehavior;
|
|
660
|
+
}
|
|
661
|
+
export interface HorizontalPodAutoscaler extends KubernetesResource {
|
|
662
|
+
spec: HorizontalPodAutoscalerSpec;
|
|
663
|
+
status?: any;
|
|
664
|
+
}
|
|
665
|
+
export interface VerticalPodAutoscaler extends KubernetesResource {
|
|
666
|
+
spec: VerticalPodAutoscalerSpec;
|
|
667
|
+
status?: {
|
|
668
|
+
recommendation?: VerticalPodAutoscalerRecommendation;
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
export interface CronHorizontalPodAutoscaler extends KubernetesResource {
|
|
672
|
+
spec: CronHorizontalPodAutoscalerSpec;
|
|
673
|
+
}
|
|
674
|
+
export declare enum VpaScalingMode {
|
|
675
|
+
Manually = "Off",
|
|
676
|
+
Dynamic = "Auto"
|
|
677
|
+
}
|
|
678
|
+
export interface VerticalPodAutoscalerSpec {
|
|
679
|
+
targetRef: {
|
|
680
|
+
apiVersion: string;
|
|
681
|
+
kind: string;
|
|
682
|
+
name: string;
|
|
683
|
+
};
|
|
684
|
+
updatePolicy: {
|
|
685
|
+
updateMode: VpaScalingMode;
|
|
686
|
+
};
|
|
687
|
+
resourcePolicy: {
|
|
688
|
+
containerPolicies: VerticalPodAutoscalerContainerPolice[];
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
export interface VerticalPodAutoscalerContainerPolice {
|
|
692
|
+
containerName: string;
|
|
693
|
+
mode: string;
|
|
694
|
+
}
|
|
695
|
+
export interface VpaContainerRecommendation {
|
|
696
|
+
containerName: string;
|
|
697
|
+
lowerBound: {
|
|
698
|
+
cpu: string;
|
|
699
|
+
memory: string;
|
|
700
|
+
};
|
|
701
|
+
target: {
|
|
702
|
+
cpu: string;
|
|
703
|
+
memory: string;
|
|
704
|
+
};
|
|
705
|
+
uncappedTarget: {
|
|
706
|
+
cpu: string;
|
|
707
|
+
memory: string;
|
|
708
|
+
};
|
|
709
|
+
upperBound: {
|
|
710
|
+
cpu: string;
|
|
711
|
+
memory: string;
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
export interface HpaSpecMetric {
|
|
715
|
+
external?: ExternalMetricSource;
|
|
716
|
+
object?: ObjectMetricSource;
|
|
717
|
+
resource?: ResourceMetricSource;
|
|
718
|
+
pods?: PodsMetricSource;
|
|
719
|
+
type: string;
|
|
720
|
+
}
|
|
721
|
+
export interface ExternalMetricSource {
|
|
722
|
+
metric?: MetricIdentifier;
|
|
723
|
+
target?: MetricTarget;
|
|
724
|
+
}
|
|
725
|
+
export interface ObjectMetricSource {
|
|
726
|
+
describedObject?: CrossVersionObjectReference;
|
|
727
|
+
metric?: MetricIdentifier;
|
|
728
|
+
target?: MetricTarget;
|
|
729
|
+
}
|
|
730
|
+
export interface PodsMetricSource {
|
|
731
|
+
metric?: MetricIdentifier;
|
|
732
|
+
target?: MetricTarget;
|
|
733
|
+
}
|
|
734
|
+
export interface ResourceMetricSource {
|
|
735
|
+
name: string;
|
|
736
|
+
target?: MetricTarget;
|
|
737
|
+
}
|
|
738
|
+
export interface MetricIdentifier {
|
|
739
|
+
name: string;
|
|
740
|
+
selector?: LabelSelector;
|
|
741
|
+
}
|
|
742
|
+
export interface MetricTarget {
|
|
743
|
+
averageUtilization?: number;
|
|
744
|
+
averageValue?: string;
|
|
745
|
+
type: string;
|
|
746
|
+
value?: string;
|
|
747
|
+
}
|
|
748
|
+
export interface VerticalPodAutoscalerRecommendation {
|
|
749
|
+
containerRecommendations: VpaContainerRecommendation[];
|
|
750
|
+
}
|
|
751
|
+
export interface CronHorizontalPodAutoscalerSpec {
|
|
752
|
+
crons: CronHorizontalPodAutoScalerRule[];
|
|
753
|
+
scaleTargetRef?: CrossVersionObjectReference;
|
|
754
|
+
}
|
|
755
|
+
export interface CrossVersionObjectReference {
|
|
756
|
+
apiVersion: string;
|
|
757
|
+
kind: string;
|
|
758
|
+
name: string;
|
|
759
|
+
}
|
|
760
|
+
export interface CronHorizontalPodAutoScalerRule {
|
|
761
|
+
schedule: string;
|
|
762
|
+
targetReplicas: number;
|
|
763
|
+
}
|
|
764
|
+
export interface HpaConfigResource {
|
|
765
|
+
hpa?: HorizontalPodAutoscaler;
|
|
766
|
+
cronHpa?: CronHorizontalPodAutoscaler;
|
|
767
|
+
vpa?: VerticalPodAutoscaler;
|
|
768
|
+
}
|
|
769
|
+
export interface ChartRepo extends KubernetesResource {
|
|
770
|
+
spec: ChartRepoSpec;
|
|
771
|
+
status?: ChartRepoStatus;
|
|
772
|
+
}
|
|
773
|
+
export declare enum ChartRepoType {
|
|
774
|
+
Chart = "Chart",
|
|
775
|
+
Git = "Git",
|
|
776
|
+
OCIChart = "OCI Chart"
|
|
777
|
+
}
|
|
778
|
+
export interface ChartRepoSpec {
|
|
779
|
+
secret?: {
|
|
780
|
+
name: string;
|
|
781
|
+
};
|
|
782
|
+
url: string;
|
|
783
|
+
type?: ChartRepoType;
|
|
784
|
+
source?: {
|
|
785
|
+
url: string;
|
|
786
|
+
path: string;
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
export interface ChartRepoStatus {
|
|
790
|
+
phase: ChartRepoPhaseEnum;
|
|
791
|
+
}
|
|
792
|
+
export declare enum ChartRepoPhaseEnum {
|
|
793
|
+
Synced = "Synced",
|
|
794
|
+
Failed = "Failed",
|
|
795
|
+
Pending = "Pending"
|
|
796
|
+
}
|
|
797
|
+
export interface GitCommitSpec {
|
|
798
|
+
project: string;
|
|
799
|
+
repo: string;
|
|
800
|
+
path: string;
|
|
801
|
+
sourceRevision?: {
|
|
802
|
+
[key in 'branch' | 'tag' | 'commit']: {
|
|
803
|
+
name: string;
|
|
804
|
+
};
|
|
805
|
+
};
|
|
806
|
+
branch: string;
|
|
807
|
+
integration: string;
|
|
808
|
+
message: string;
|
|
809
|
+
createPullRequest: boolean;
|
|
810
|
+
removeSourceBranch: boolean;
|
|
811
|
+
}
|
|
812
|
+
export interface GitCommit {
|
|
813
|
+
spec: GitCommitSpec;
|
|
814
|
+
}
|
|
815
|
+
export interface EphemeralContainers extends KubernetesResource {
|
|
816
|
+
ephemeralContainers: EphemeralContainerSpec[];
|
|
817
|
+
}
|
|
818
|
+
export interface EphemeralContainerSpec {
|
|
819
|
+
command: string[];
|
|
820
|
+
image: string;
|
|
821
|
+
imagePullPolicy: string;
|
|
822
|
+
name: string;
|
|
823
|
+
stdin: boolean;
|
|
824
|
+
tty: boolean;
|
|
825
|
+
terminationMessagePolicy?: string;
|
|
826
|
+
[key: string]: unknown;
|
|
827
|
+
}
|
|
828
|
+
export interface NamespaceOverviewAppStats {
|
|
829
|
+
total: number;
|
|
830
|
+
running: number;
|
|
831
|
+
partialRunning: number;
|
|
832
|
+
pending: number;
|
|
833
|
+
failed: number;
|
|
834
|
+
empty: number;
|
|
835
|
+
stopped: number;
|
|
836
|
+
}
|
|
837
|
+
export interface WorkloadStats {
|
|
838
|
+
ready: number;
|
|
839
|
+
pending: number;
|
|
840
|
+
stopped: number;
|
|
841
|
+
}
|
|
842
|
+
export interface ResourceQuotaItem {
|
|
843
|
+
cpu?: string;
|
|
844
|
+
memory?: string;
|
|
845
|
+
pods?: string;
|
|
846
|
+
'limits.cpu'?: string;
|
|
847
|
+
'requests.cpu'?: string;
|
|
848
|
+
'limits.memory'?: string;
|
|
849
|
+
'requests.memory'?: string;
|
|
850
|
+
'requests.storage'?: string;
|
|
851
|
+
persistentvolumeclaims?: string;
|
|
852
|
+
}
|
|
853
|
+
export interface NamespaceOverviewResourceQuota {
|
|
854
|
+
parent?: ResourceQuotaItem;
|
|
855
|
+
hard?: ResourceQuotaItem;
|
|
856
|
+
used?: ResourceQuotaItem;
|
|
857
|
+
}
|
|
858
|
+
export interface NamespaceOverview extends KubernetesResource {
|
|
859
|
+
kind: 'NamespaceOverview';
|
|
860
|
+
spec: NamespaceOverviewSpec;
|
|
861
|
+
}
|
|
862
|
+
export interface PodError {
|
|
863
|
+
name: string;
|
|
864
|
+
status: string;
|
|
865
|
+
reason: string;
|
|
866
|
+
}
|
|
867
|
+
export interface ResourceQuota extends KubernetesResource {
|
|
868
|
+
spec?: ResourceQuotaSpec;
|
|
869
|
+
}
|
|
870
|
+
export interface ResourceQuotaSpec {
|
|
871
|
+
hard?: ResourceQuotaItem;
|
|
872
|
+
scopes?: ResourceQuotaScope[];
|
|
873
|
+
}
|
|
874
|
+
export type ResourceQuotaScope = 'Terminating' | 'NotTerminating' | 'BestEffort' | 'NotBestEffort';
|
|
875
|
+
export interface NamespaceOverviewSpec {
|
|
876
|
+
application: NamespaceOverviewAppStats;
|
|
877
|
+
resourceQuota: NamespaceOverviewResourceQuota;
|
|
878
|
+
workload: {
|
|
879
|
+
deployment: WorkloadStats;
|
|
880
|
+
daemonset: WorkloadStats;
|
|
881
|
+
statefulset: WorkloadStats;
|
|
882
|
+
};
|
|
883
|
+
pod: {
|
|
884
|
+
stats: {
|
|
885
|
+
running: number;
|
|
886
|
+
pending: number;
|
|
887
|
+
error: number;
|
|
888
|
+
succeeded: number;
|
|
889
|
+
evicted: number;
|
|
890
|
+
};
|
|
891
|
+
errors: PodError[];
|
|
892
|
+
};
|
|
893
|
+
}
|
|
894
|
+
export interface ArgoCdApplicationSet extends KubernetesResource {
|
|
895
|
+
kind: GITOPS_APP_TYPES.ApplicationSet;
|
|
896
|
+
spec: ArgoCdApplicationSetSpec;
|
|
897
|
+
status?: {
|
|
898
|
+
conditions: ArgoCdApplicationCondition[];
|
|
899
|
+
applicationStatus: ArgoCdApplicationStatus[];
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
export interface ArgoCdApplicationStatus {
|
|
903
|
+
application: string;
|
|
904
|
+
message: string;
|
|
905
|
+
status: string;
|
|
906
|
+
step: string;
|
|
907
|
+
}
|
|
908
|
+
export interface ArgoCdApplicationCondition {
|
|
909
|
+
message: string;
|
|
910
|
+
reason: string;
|
|
911
|
+
status: 'True' | 'False';
|
|
912
|
+
type: string;
|
|
913
|
+
}
|
|
914
|
+
export interface ArgoCdApplicationSetSpec {
|
|
915
|
+
generators: ArgoCdApplicationSetSpecGenerator[];
|
|
916
|
+
template: ArgoCdApplicationSpecTemplate;
|
|
917
|
+
}
|
|
918
|
+
export interface GitOpsIgnoreDifferenceConfig {
|
|
919
|
+
group: string;
|
|
920
|
+
kind: string;
|
|
921
|
+
jsonPointers: string[];
|
|
922
|
+
}
|
|
923
|
+
export interface ArgoCdApplicationSpecTemplate {
|
|
924
|
+
metadata: {
|
|
925
|
+
name?: string;
|
|
926
|
+
labels: StringMap;
|
|
927
|
+
};
|
|
928
|
+
spec: {
|
|
929
|
+
project: string;
|
|
930
|
+
source: {
|
|
931
|
+
repoURL: string;
|
|
932
|
+
targetRevision: string;
|
|
933
|
+
path?: string;
|
|
934
|
+
directory?: {
|
|
935
|
+
recurse: boolean;
|
|
936
|
+
};
|
|
937
|
+
};
|
|
938
|
+
destination?: {
|
|
939
|
+
name: string;
|
|
940
|
+
namespace: string;
|
|
941
|
+
};
|
|
942
|
+
ignoreDifferences?: GitOpsIgnoreDifferenceConfig[];
|
|
943
|
+
helm?: {
|
|
944
|
+
valueFiles: [string];
|
|
945
|
+
};
|
|
946
|
+
syncPolicy: {
|
|
947
|
+
automated: unknown;
|
|
948
|
+
syncOptions?: string[];
|
|
949
|
+
};
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
export interface ArgoCdApplicationSetSpecGenerator {
|
|
953
|
+
merge?: {
|
|
954
|
+
mergeKeys: string[];
|
|
955
|
+
generators: [
|
|
956
|
+
ArgoCdApplicationSetSpecMergeGeneratorBase,
|
|
957
|
+
ArgoCdApplicationSetSpecMergeGeneratorExtend
|
|
958
|
+
];
|
|
959
|
+
};
|
|
960
|
+
list?: {
|
|
961
|
+
elements: Array<{
|
|
962
|
+
values: ArgoCdApplicationValues;
|
|
963
|
+
}>;
|
|
964
|
+
};
|
|
965
|
+
clusters?: {
|
|
966
|
+
selector: Selector;
|
|
967
|
+
values?: StringMap;
|
|
968
|
+
};
|
|
969
|
+
}
|
|
970
|
+
export interface ArgoCdApplicationSetSpecMergeGeneratorBase {
|
|
971
|
+
list: {
|
|
972
|
+
elements: Array<{
|
|
973
|
+
values: {
|
|
974
|
+
key: string;
|
|
975
|
+
path: string;
|
|
976
|
+
};
|
|
977
|
+
}>;
|
|
978
|
+
};
|
|
979
|
+
}
|
|
980
|
+
export interface ArgoCdApplicationSetSpecMergeGeneratorExtend {
|
|
981
|
+
list: {
|
|
982
|
+
elements: Array<{
|
|
983
|
+
values: ArgoCdApplicationValues;
|
|
984
|
+
}>;
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
export interface ArgoCdApplicationValues {
|
|
988
|
+
key?: string;
|
|
989
|
+
cluster: string;
|
|
990
|
+
namespace: string;
|
|
991
|
+
nameSuffix?: string;
|
|
992
|
+
path?: string;
|
|
993
|
+
valueFile?: string;
|
|
994
|
+
}
|
|
995
|
+
export interface ArgoCdApplicationValuesModel {
|
|
996
|
+
key?: string;
|
|
997
|
+
cluster: string;
|
|
998
|
+
namespaces: string[];
|
|
999
|
+
nameSuffix?: string;
|
|
1000
|
+
path?: string;
|
|
1001
|
+
valueFile?: string;
|
|
1002
|
+
}
|
|
1003
|
+
export interface ArgoCdApplicationOperationState {
|
|
1004
|
+
phase: ArgoCdApplicationOperationStatePhase;
|
|
1005
|
+
operation?: {
|
|
1006
|
+
sync?: {
|
|
1007
|
+
resources?: ArgoCdApplicationResource[];
|
|
1008
|
+
};
|
|
1009
|
+
};
|
|
1010
|
+
message: string;
|
|
1011
|
+
startedAt: string;
|
|
1012
|
+
finishedAt: string;
|
|
1013
|
+
syncResult: {
|
|
1014
|
+
revision: string;
|
|
1015
|
+
source: ArgoCdApplicationSource;
|
|
1016
|
+
resources: ArgoCdApplicationSyncResource[];
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
export interface ArgoCdApplicationSource {
|
|
1020
|
+
repoURL: string;
|
|
1021
|
+
targetRevision: string;
|
|
1022
|
+
path: string;
|
|
1023
|
+
kustomize?: unknown;
|
|
1024
|
+
}
|
|
1025
|
+
export interface ArgoCdApplicationHistory {
|
|
1026
|
+
deployStartedAt: string;
|
|
1027
|
+
deployedAt: string;
|
|
1028
|
+
id: string;
|
|
1029
|
+
revision: string;
|
|
1030
|
+
source: ArgoCdApplicationSource;
|
|
1031
|
+
}
|
|
1032
|
+
export declare enum GITOPS_APP_TYPES {
|
|
1033
|
+
Application = "Application",
|
|
1034
|
+
ApplicationSet = "ApplicationSet"
|
|
1035
|
+
}
|
|
1036
|
+
export interface ArgoCdApplication extends KubernetesResource {
|
|
1037
|
+
kind: GITOPS_APP_TYPES.Application;
|
|
1038
|
+
status?: {
|
|
1039
|
+
resources: ArgoCdApplicationResource[];
|
|
1040
|
+
sync: {
|
|
1041
|
+
status: GitopsResourceSyncStatus;
|
|
1042
|
+
};
|
|
1043
|
+
operationState: ArgoCdApplicationOperationState;
|
|
1044
|
+
health: {
|
|
1045
|
+
status: GitopsResourceHealthStatus;
|
|
1046
|
+
};
|
|
1047
|
+
conditions: ArgoCdApplicationCondition[];
|
|
1048
|
+
history?: ArgoCdApplicationHistory[];
|
|
1049
|
+
};
|
|
1050
|
+
operation?: {
|
|
1051
|
+
initiatedBy: {
|
|
1052
|
+
username: string;
|
|
1053
|
+
};
|
|
1054
|
+
retry: {
|
|
1055
|
+
limit: number;
|
|
1056
|
+
};
|
|
1057
|
+
sync: {
|
|
1058
|
+
prune: boolean;
|
|
1059
|
+
syncOptions: string[];
|
|
1060
|
+
};
|
|
1061
|
+
};
|
|
1062
|
+
spec: {
|
|
1063
|
+
project: string;
|
|
1064
|
+
source: ArgoCdApplicationSource;
|
|
1065
|
+
destination: {
|
|
1066
|
+
namespace: string;
|
|
1067
|
+
name?: string;
|
|
1068
|
+
};
|
|
1069
|
+
syncPolicy?: {
|
|
1070
|
+
automated: unknown;
|
|
1071
|
+
syncOptions?: string[];
|
|
1072
|
+
};
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
export interface ArgoCdApplicationBaseResource {
|
|
1076
|
+
kind: string;
|
|
1077
|
+
name: string;
|
|
1078
|
+
namespace: string;
|
|
1079
|
+
status?: GitopsResourceSyncStatus;
|
|
1080
|
+
version: string;
|
|
1081
|
+
group: string;
|
|
1082
|
+
}
|
|
1083
|
+
export declare enum ArgoCdApplicationHealthStatus {
|
|
1084
|
+
Progressing = "Progressing",// 正在部署
|
|
1085
|
+
Missing = "Missing",// 资源丢失
|
|
1086
|
+
Healthy = "Healthy",// 健康,表示应用正常运行
|
|
1087
|
+
Suspended = "Suspended",// 暂停,表示有任务被暂停,指CronJob资源
|
|
1088
|
+
Degraded = "Degraded",// 降级,表示有些资源不健康
|
|
1089
|
+
Unknown = "Unknown"
|
|
1090
|
+
}
|
|
1091
|
+
export interface ArgoCdApplicationResource extends ArgoCdApplicationBaseResource {
|
|
1092
|
+
health: {
|
|
1093
|
+
status: ArgoCdApplicationHealthStatus;
|
|
1094
|
+
};
|
|
1095
|
+
}
|
|
1096
|
+
export interface ArgoCdApplicationSyncResource extends ArgoCdApplicationBaseResource {
|
|
1097
|
+
hookPhase: ArgoCdApplicationOperationStatePhase;
|
|
1098
|
+
message: string;
|
|
1099
|
+
}
|
|
1100
|
+
export declare enum ArgoCdApplicationOperationStatePhase {
|
|
1101
|
+
Error = "Error",
|
|
1102
|
+
Running = "Running",
|
|
1103
|
+
Failed = "Failed",
|
|
1104
|
+
Terminating = "Terminating",
|
|
1105
|
+
Succeeded = "Succeeded"
|
|
1106
|
+
}
|
|
1107
|
+
export declare enum GitopsResourceSyncStatus {
|
|
1108
|
+
Synced = "Synced",// 表示已同步
|
|
1109
|
+
OutOfSync = "OutOfSync",// 表示不一致
|
|
1110
|
+
Failed = "Failed",// 表示不一致
|
|
1111
|
+
Syncing = "Syncing",// 表示不一致
|
|
1112
|
+
Unknown = "Unknown"
|
|
1113
|
+
}
|
|
1114
|
+
export declare enum GitopsResourceHealthStatus {
|
|
1115
|
+
Progressing = "Progressing",// 正在部署
|
|
1116
|
+
Missing = "Missing",// 资源丢失
|
|
1117
|
+
Healthy = "Healthy",// 健康,表示应用正常运行
|
|
1118
|
+
Suspended = "Suspended",// 暂停,表示有任务被暂停,指CronJob资源
|
|
1119
|
+
Degraded = "Degraded",// 降级,表示有些资源不健康
|
|
1120
|
+
Unknown = "Unknown"
|
|
1121
|
+
}
|
|
1122
|
+
export interface RepoFilePathFlatTree {
|
|
1123
|
+
mode?: string;
|
|
1124
|
+
name: string;
|
|
1125
|
+
path: string;
|
|
1126
|
+
sha?: string;
|
|
1127
|
+
type: 'blob' | 'tree';
|
|
1128
|
+
}
|
|
1129
|
+
export interface RepoFilePath extends KubernetesResource {
|
|
1130
|
+
spec: {
|
|
1131
|
+
tree: RepoFilePathFlatTree[];
|
|
1132
|
+
};
|
|
1133
|
+
}
|
|
1134
|
+
export interface AppCustomMonitorIndicator {
|
|
1135
|
+
type: string;
|
|
1136
|
+
indicator: string;
|
|
1137
|
+
resources?: [];
|
|
1138
|
+
expr: string;
|
|
1139
|
+
displayName: string;
|
|
1140
|
+
unit: string;
|
|
1141
|
+
legend: string;
|
|
1142
|
+
}
|
|
1143
|
+
export interface AppCustomMonitorIndicatorsSpec {
|
|
1144
|
+
panels: Array<{
|
|
1145
|
+
targets: AppCustomMonitorIndicator[];
|
|
1146
|
+
}>;
|
|
1147
|
+
}
|