@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,220 @@
|
|
|
1
|
+
import { K8sResourceAction, KubernetesResource, DaemonSet, Deployment, StatefulSet, WorkloadStatusEnum } from '@alauda-fe/common';
|
|
2
|
+
import { OamAppOriginalStatusEnum } from './status';
|
|
3
|
+
export type Workload = Deployment | StatefulSet | DaemonSet;
|
|
4
|
+
export declare enum WorkloadKind {
|
|
5
|
+
Deployment = "Deployment",
|
|
6
|
+
StatefulSet = "StatefulSet",
|
|
7
|
+
DaemonSet = "DaemonSet"
|
|
8
|
+
}
|
|
9
|
+
export interface K8sResourceWithActions<T extends KubernetesResource = KubernetesResource> {
|
|
10
|
+
kubernetes: T;
|
|
11
|
+
resource_actions?: string[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* application address
|
|
15
|
+
* refers to: http://confluence.alaudatech.com/pages/viewpage.action?pageId=44663323#id-%E6%96%B0%E5%BA%94%E7%94%A8API-1.1.6GET/acp/v1/kubernetes/%3Ccluster_name%3E/namespaces/%3Cnamespace%3E/applications/%3Cname%3E/address
|
|
16
|
+
*/
|
|
17
|
+
export interface ApplicationAddress {
|
|
18
|
+
workloads?: {
|
|
19
|
+
[key: string]: {
|
|
20
|
+
[key: string]: WorkloadAddress[];
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface WorkloadAddress {
|
|
25
|
+
name?: string;
|
|
26
|
+
protocol?: string;
|
|
27
|
+
host?: string;
|
|
28
|
+
frontend?: number;
|
|
29
|
+
port?: number;
|
|
30
|
+
url?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface AlbRules extends KubernetesResource {
|
|
33
|
+
spec: AlbRulesSpec;
|
|
34
|
+
}
|
|
35
|
+
export interface AlbRulesSpec {
|
|
36
|
+
address: string;
|
|
37
|
+
rules: AlbRule[];
|
|
38
|
+
}
|
|
39
|
+
export interface AlbRule {
|
|
40
|
+
name: string;
|
|
41
|
+
namespace: string;
|
|
42
|
+
url?: string;
|
|
43
|
+
port: number;
|
|
44
|
+
protocol: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* API resource types
|
|
48
|
+
* refers to: http://confluence.alaudatech.com/pages/viewpage.action?pageId=44663323#id-%E6%96%B0%E5%BA%94%E7%94%A8API-1.2.0GET/acp/v1/resources/{cluster}/resourcetypes
|
|
49
|
+
*/
|
|
50
|
+
export interface APIResource {
|
|
51
|
+
kind: string;
|
|
52
|
+
name: string;
|
|
53
|
+
singularName?: string;
|
|
54
|
+
shortNames?: string[];
|
|
55
|
+
namespaced: boolean;
|
|
56
|
+
verbs: K8sResourceAction[];
|
|
57
|
+
groupVersion?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface APIResourceList {
|
|
60
|
+
kind: 'APIResourceList';
|
|
61
|
+
apiVersion?: string;
|
|
62
|
+
groupVersion: string;
|
|
63
|
+
resources: APIResource[];
|
|
64
|
+
}
|
|
65
|
+
export interface Workloads {
|
|
66
|
+
Deployment?: Deployment[];
|
|
67
|
+
DaemonSet?: DaemonSet[];
|
|
68
|
+
StatefulSet?: StatefulSet[];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Container Log
|
|
72
|
+
* refers to: http://confluence.alaudatech.com/pages/viewpage.action?pageId=44663323#id-%E6%96%B0%E5%BA%94%E7%94%A8API-1.2.1GET/acp/v1/kubernetes/{cluster}/namespace/{namespace}/pods/{podName}/{containerName}/log
|
|
73
|
+
*/
|
|
74
|
+
export interface ContainerLogParams {
|
|
75
|
+
previous?: string;
|
|
76
|
+
logFilePosition?: string;
|
|
77
|
+
referenceTimestamp?: string;
|
|
78
|
+
referenceLineNum?: string;
|
|
79
|
+
offsetFrom?: string;
|
|
80
|
+
offsetTo?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface LogInfo {
|
|
83
|
+
podName: string;
|
|
84
|
+
containerName: string;
|
|
85
|
+
initContainerName: string;
|
|
86
|
+
fromDate: string;
|
|
87
|
+
toDate: string;
|
|
88
|
+
truncated: boolean;
|
|
89
|
+
}
|
|
90
|
+
export interface LogLine {
|
|
91
|
+
timestamp: string;
|
|
92
|
+
content: string;
|
|
93
|
+
}
|
|
94
|
+
export interface LogSelection {
|
|
95
|
+
logFilePosition: string;
|
|
96
|
+
referencePoint: LogLineReference;
|
|
97
|
+
offsetFrom: number;
|
|
98
|
+
offsetTo: number;
|
|
99
|
+
}
|
|
100
|
+
export interface LogLineReference {
|
|
101
|
+
timestamp: string;
|
|
102
|
+
lineNum: number;
|
|
103
|
+
}
|
|
104
|
+
export interface ContainerLog {
|
|
105
|
+
info: LogInfo;
|
|
106
|
+
logs: LogLine[];
|
|
107
|
+
selection: LogSelection;
|
|
108
|
+
}
|
|
109
|
+
export interface Certificate {
|
|
110
|
+
name: string;
|
|
111
|
+
namespace: string;
|
|
112
|
+
notBefore: string;
|
|
113
|
+
notAfter: string;
|
|
114
|
+
dnsNames: string[];
|
|
115
|
+
valid: boolean;
|
|
116
|
+
reasonCode?: 1 | 2 | 3;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* 应用拓扑api 文档:https://confluence.alauda.cn/pages/viewpage.action?pageId=115527477
|
|
120
|
+
*/
|
|
121
|
+
export interface TopologyEdge {
|
|
122
|
+
type: string;
|
|
123
|
+
from?: string;
|
|
124
|
+
to?: string;
|
|
125
|
+
}
|
|
126
|
+
export interface TopologyResponse {
|
|
127
|
+
nodes: {
|
|
128
|
+
[key: string]: KubernetesResource;
|
|
129
|
+
};
|
|
130
|
+
edges: TopologyEdge[];
|
|
131
|
+
}
|
|
132
|
+
export interface AppTopologyApplication {
|
|
133
|
+
kind: string;
|
|
134
|
+
name: string;
|
|
135
|
+
uuid: string;
|
|
136
|
+
state: string;
|
|
137
|
+
edges?: TopologyEdge[];
|
|
138
|
+
}
|
|
139
|
+
export interface AppBaseTopology {
|
|
140
|
+
workloads?: Record<string, Record<string, AppTopologyWorkloadNode>>;
|
|
141
|
+
services?: Record<string, AppTopologyNode>;
|
|
142
|
+
configmaps?: Record<string, AppTopologyNode>;
|
|
143
|
+
secrets?: Record<string, AppTopologyNode>;
|
|
144
|
+
pvcs?: Record<string, AppTopologyNode>;
|
|
145
|
+
albs?: Record<string, AppTopologyNode>;
|
|
146
|
+
ingresses?: Record<string, AppTopologyNode>;
|
|
147
|
+
startstopscalertraits?: Record<string, AppTopologyNode>;
|
|
148
|
+
statistics?: {
|
|
149
|
+
wcounts: number;
|
|
150
|
+
wlimit: number;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
export interface AppTopology extends AppBaseTopology {
|
|
154
|
+
application?: AppTopologyApplication;
|
|
155
|
+
others?: Record<string, AppTopologyNode>;
|
|
156
|
+
}
|
|
157
|
+
export interface ArgocdApplicationSetTopology {
|
|
158
|
+
applicationSet: AppTopologyNode;
|
|
159
|
+
applications: Record<string, AppTopologyNode>;
|
|
160
|
+
}
|
|
161
|
+
export interface ArgocdApplicationTopology {
|
|
162
|
+
application: AppTopologyNode;
|
|
163
|
+
applications: Record<string, AppTopologyNode>;
|
|
164
|
+
oamapps: Record<string, AppTopologyNode>;
|
|
165
|
+
}
|
|
166
|
+
export interface AppTopologyNode {
|
|
167
|
+
uid: string;
|
|
168
|
+
name: string;
|
|
169
|
+
namespace?: string;
|
|
170
|
+
cluster?: string;
|
|
171
|
+
apiVersion?: string;
|
|
172
|
+
kind: string;
|
|
173
|
+
displayName?: string;
|
|
174
|
+
edges?: TopologyEdge[];
|
|
175
|
+
component?: string;
|
|
176
|
+
originalResource?: KubernetesResource;
|
|
177
|
+
state?: string;
|
|
178
|
+
syncStatus?: string;
|
|
179
|
+
restricted?: boolean;
|
|
180
|
+
}
|
|
181
|
+
export interface AppTopologyPodNode extends AppTopologyNode {
|
|
182
|
+
current: number;
|
|
183
|
+
desired: number;
|
|
184
|
+
state: WorkloadStatusEnum;
|
|
185
|
+
podIP: string;
|
|
186
|
+
}
|
|
187
|
+
export interface AppTopologyWorkloadNode extends AppTopologyNode {
|
|
188
|
+
current: number;
|
|
189
|
+
desired: number;
|
|
190
|
+
state: WorkloadStatusEnum;
|
|
191
|
+
pods: AppTopologyPodNode[];
|
|
192
|
+
}
|
|
193
|
+
export interface AppTopologyComponentNode extends AppTopologyNode {
|
|
194
|
+
current: number;
|
|
195
|
+
desired: number;
|
|
196
|
+
state: WorkloadStatusEnum;
|
|
197
|
+
pods: AppTopologyPodNode[];
|
|
198
|
+
}
|
|
199
|
+
export interface AppTopologyExtraResourceNode extends AppTopologyNode {
|
|
200
|
+
namespace: string;
|
|
201
|
+
apiVersion: string;
|
|
202
|
+
}
|
|
203
|
+
export interface OamAppTopology extends AppTopology {
|
|
204
|
+
components?: OamAppTopologyComponentNode[];
|
|
205
|
+
startstopscalertraits?: Record<string, AppTopologyNode>;
|
|
206
|
+
}
|
|
207
|
+
export interface OamAppTopologyComponentNode extends AppTopologyNode {
|
|
208
|
+
state: OamAppOriginalStatusEnum;
|
|
209
|
+
type: string;
|
|
210
|
+
}
|
|
211
|
+
export interface OamAppTopologyTraitNode extends AppTopologyNode {
|
|
212
|
+
state: WorkloadStatusEnum;
|
|
213
|
+
component: string;
|
|
214
|
+
}
|
|
215
|
+
export type Pagination<T, O = {
|
|
216
|
+
[key: string]: unknown;
|
|
217
|
+
}> = {
|
|
218
|
+
total: number;
|
|
219
|
+
items: T[];
|
|
220
|
+
} & O;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { KubernetesResource } from '@alauda-fe/common';
|
|
2
|
+
export interface BatchActionResource<Phase extends string = string, ResultState extends string = string> extends KubernetesResource {
|
|
3
|
+
spec: {
|
|
4
|
+
actions: Array<{
|
|
5
|
+
name: string;
|
|
6
|
+
verb: 'put' | 'patch' | 'delete' | 'post';
|
|
7
|
+
target: {
|
|
8
|
+
names: string[];
|
|
9
|
+
resource: {
|
|
10
|
+
group: string;
|
|
11
|
+
version: string;
|
|
12
|
+
resource: string;
|
|
13
|
+
subresource?: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
body?: string;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
status?: {
|
|
20
|
+
phase: Phase;
|
|
21
|
+
completionTime?: string;
|
|
22
|
+
startTime?: string;
|
|
23
|
+
expiredTime?: string;
|
|
24
|
+
cancelledTime?: string;
|
|
25
|
+
actionResults?: Array<{
|
|
26
|
+
name: string;
|
|
27
|
+
results: {
|
|
28
|
+
[name: string]: {
|
|
29
|
+
state: ResultState;
|
|
30
|
+
reason?: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Secret, ResourceListParams, Environments as _Environments, TranslateKey, Workspace } from '@alauda-fe/common';
|
|
2
|
+
import { ResourceQuotaItem } from './k8s';
|
|
3
|
+
export interface WorkspaceDetailParams extends Workspace {
|
|
4
|
+
name?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface WorkspaceListParams extends Workspace, ResourceListParams {
|
|
7
|
+
}
|
|
8
|
+
export interface AdminBaseParams {
|
|
9
|
+
cluster?: string;
|
|
10
|
+
namespace?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface AdminDetailParams extends AdminBaseParams {
|
|
13
|
+
name?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface AdminListParams extends AdminBaseParams, ResourceListParams {
|
|
16
|
+
}
|
|
17
|
+
export type Environments = _Environments;
|
|
18
|
+
/**
|
|
19
|
+
* Console related status.
|
|
20
|
+
*
|
|
21
|
+
* All feature related status should be mapped into one of the categories
|
|
22
|
+
*/
|
|
23
|
+
export declare enum UnifiedStatus {
|
|
24
|
+
SUCCESS = "SUCCESS",
|
|
25
|
+
ERROR = "ERROR",
|
|
26
|
+
PENDING = "PENDING",
|
|
27
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
28
|
+
INACTIVE = "INACTIVE"
|
|
29
|
+
}
|
|
30
|
+
export interface SecretsGroup {
|
|
31
|
+
global: Secret[];
|
|
32
|
+
namespace: Secret[];
|
|
33
|
+
}
|
|
34
|
+
export interface ExecInfo {
|
|
35
|
+
user: string;
|
|
36
|
+
command: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ResourceQuotaDefinition {
|
|
39
|
+
key: keyof ResourceQuotaItem;
|
|
40
|
+
fallbackKey?: keyof ResourceQuotaItem;
|
|
41
|
+
name: TranslateKey;
|
|
42
|
+
unit: string;
|
|
43
|
+
description?: TranslateKey;
|
|
44
|
+
normalizer?: (value: string) => string;
|
|
45
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './account';
|
|
2
|
+
export * from './backend-api';
|
|
3
|
+
export * from './batch-action.type';
|
|
4
|
+
export * from './form';
|
|
5
|
+
export * from './helpers';
|
|
6
|
+
export * from './k8s';
|
|
7
|
+
export * from './k8s-form-model';
|
|
8
|
+
export * from './k8s-resource-definitions';
|
|
9
|
+
export * from './status';
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { KubernetesResource, LabelSelector, ObjectMeta, StringMap, Container, DaemonSetSpec, DaemonSetUpdateStrategy, DeploymentSpec, DeploymentStrategy, JobSpec, Probe, Service, StatefulSetSpec, StatefulSetUpdateStrategy, IngressRule, LocalObjectReference, PodAffinityTerm, PodSpecAffinity, WeightedPodAffinityTerm, IngressBackend } from '@alauda-fe/common';
|
|
2
|
+
import { ClusterNetworkType } from '@alauda-fe/network';
|
|
3
|
+
import { Workload, WorkloadKind, Workloads } from './backend-api';
|
|
4
|
+
export declare const LOG_PATH_KEY = "__FILE_LOG_PATH__";
|
|
5
|
+
export declare const EXCLUDE_LOG_PATH_KEY = "__EXCLUDE_LOG_PATH__";
|
|
6
|
+
export interface ContainerProbes {
|
|
7
|
+
livenessProbe?: Probe;
|
|
8
|
+
readinessProbe?: Probe;
|
|
9
|
+
}
|
|
10
|
+
export interface WorkloadOption {
|
|
11
|
+
kind: WorkloadKind;
|
|
12
|
+
name: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ApplicationFormModel<T extends KubernetesResource = KubernetesResource> extends KubernetesResource {
|
|
15
|
+
spec?: {
|
|
16
|
+
selector?: LabelSelector;
|
|
17
|
+
componentTemplates: T[];
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface PodControllerFormModel extends KubernetesResource {
|
|
21
|
+
suffixName?: string;
|
|
22
|
+
spec?: DeploymentSpec | StatefulSetSpec | DaemonSetSpec;
|
|
23
|
+
}
|
|
24
|
+
export interface PodTemplateSpecFormModel {
|
|
25
|
+
network?: PodNetworkFormModel;
|
|
26
|
+
metadata: ObjectMeta;
|
|
27
|
+
spec: PodSpecFormModel;
|
|
28
|
+
}
|
|
29
|
+
export interface PodSpecFormModel {
|
|
30
|
+
initContainers?: ContainerFormModel[];
|
|
31
|
+
containers?: ContainerFormModel[];
|
|
32
|
+
hostNetwork?: boolean;
|
|
33
|
+
nodeSelector?: StringMap;
|
|
34
|
+
affinity?: PodSpecAffinity;
|
|
35
|
+
imagePullSecrets?: LocalObjectReference[];
|
|
36
|
+
terminationGracePeriodSeconds?: number;
|
|
37
|
+
runtimeClassName?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface PodNetworkFormModel {
|
|
40
|
+
fixIp?: string[];
|
|
41
|
+
networkType?: ClusterNetworkType;
|
|
42
|
+
subnet?: string;
|
|
43
|
+
ingressRate?: number | string;
|
|
44
|
+
egressRate?: number | string;
|
|
45
|
+
}
|
|
46
|
+
export interface ContainerFormModel extends Container {
|
|
47
|
+
probes?: {
|
|
48
|
+
livenessProbe?: Probe;
|
|
49
|
+
readinessProbe?: Probe;
|
|
50
|
+
};
|
|
51
|
+
logPaths?: string[];
|
|
52
|
+
excludeLogPaths?: string[];
|
|
53
|
+
}
|
|
54
|
+
export interface PodAffinityFormModel {
|
|
55
|
+
type: string;
|
|
56
|
+
weight: number;
|
|
57
|
+
topologyKey: string;
|
|
58
|
+
labelSelector: LabelSelector;
|
|
59
|
+
}
|
|
60
|
+
export type AffinityTerm = WeightedPodAffinityTerm | PodAffinityTerm;
|
|
61
|
+
export declare const PodAffinityType: {
|
|
62
|
+
readonly required: "requiredDuringSchedulingIgnoredDuringExecution";
|
|
63
|
+
readonly preferred: "preferredDuringSchedulingIgnoredDuringExecution";
|
|
64
|
+
};
|
|
65
|
+
export interface ResourceRequirementsFormModel {
|
|
66
|
+
limits?: {
|
|
67
|
+
cpu?: {
|
|
68
|
+
value: string;
|
|
69
|
+
unit: string;
|
|
70
|
+
};
|
|
71
|
+
memory?: {
|
|
72
|
+
value: string;
|
|
73
|
+
unit: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
requests?: {
|
|
77
|
+
cpu?: {
|
|
78
|
+
value: string;
|
|
79
|
+
unit: string;
|
|
80
|
+
};
|
|
81
|
+
memory?: {
|
|
82
|
+
value: string;
|
|
83
|
+
unit: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
customResource?: {
|
|
87
|
+
limits: {
|
|
88
|
+
[key: string]: string;
|
|
89
|
+
};
|
|
90
|
+
requests: {
|
|
91
|
+
[key: string]: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export type StrategyFormModel = DeploymentStrategy | DaemonSetUpdateStrategy | StatefulSetUpdateStrategy;
|
|
96
|
+
export interface ServiceFormModel {
|
|
97
|
+
service: Service;
|
|
98
|
+
workload?: Workload;
|
|
99
|
+
targetComponents?: 'workload' | 'virtualization' | 'label-selectors';
|
|
100
|
+
workloadType?: keyof Workloads;
|
|
101
|
+
workloadName?: string;
|
|
102
|
+
virtualizationType?: 'VirtualMachine' | 'VirtualMachinePool';
|
|
103
|
+
virtualizationName?: string;
|
|
104
|
+
_selector?: StringMap;
|
|
105
|
+
annotations?: StringMap;
|
|
106
|
+
}
|
|
107
|
+
export declare enum PodNetworkTypeEnum {
|
|
108
|
+
host = "Host",
|
|
109
|
+
cluster = "Cluster"
|
|
110
|
+
}
|
|
111
|
+
export interface IngressRuleFormModel extends IngressRule {
|
|
112
|
+
protocol?: string;
|
|
113
|
+
secretName?: string;
|
|
114
|
+
domain?: string;
|
|
115
|
+
subDomain?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface IngressSpecFormModel {
|
|
118
|
+
ingressClassName?: string;
|
|
119
|
+
backend?: IngressBackend;
|
|
120
|
+
rules?: IngressRuleFormModel[];
|
|
121
|
+
}
|
|
122
|
+
export interface IngressFormModel extends KubernetesResource {
|
|
123
|
+
spec?: IngressSpecFormModel;
|
|
124
|
+
}
|
|
125
|
+
export interface JobSpecFormModel extends JobSpec {
|
|
126
|
+
jobType?: string;
|
|
127
|
+
startingDeadlineSeconds?: number | '';
|
|
128
|
+
}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
export declare const OAM_GROUP = "core.oam.dev";
|
|
2
|
+
export declare const GATEWAY_NETWORKING_GROUP = "gateway.networking.k8s.io";
|
|
3
|
+
export declare const ACPResourceDefinitions: {
|
|
4
|
+
readonly VERTICAL_POD_AUTOSCALER: {
|
|
5
|
+
readonly apiGroup: "autoscaling.k8s.io";
|
|
6
|
+
readonly apiVersion: "v1";
|
|
7
|
+
readonly type: "VerticalPodAutoscaler";
|
|
8
|
+
};
|
|
9
|
+
readonly POD_AUTOSCALER: {
|
|
10
|
+
readonly apiGroup: "autoscaling.k8s.io";
|
|
11
|
+
readonly apiVersion: "v1";
|
|
12
|
+
readonly type: "PodAutoscaler";
|
|
13
|
+
};
|
|
14
|
+
readonly ROUTE: {
|
|
15
|
+
readonly type: "routes";
|
|
16
|
+
readonly apiGroup: "route.openshift.io";
|
|
17
|
+
};
|
|
18
|
+
readonly ADDON: {
|
|
19
|
+
readonly apiGroup: "platform.tkestack.io";
|
|
20
|
+
readonly type: "addons";
|
|
21
|
+
};
|
|
22
|
+
readonly INSTALLPLAN: {
|
|
23
|
+
readonly apiGroup: "operators.coreos.com";
|
|
24
|
+
readonly apiVersion: "v1alpha1";
|
|
25
|
+
readonly type: "installplans";
|
|
26
|
+
};
|
|
27
|
+
readonly CEPH_CLUSTER: {
|
|
28
|
+
readonly apiGroup: "ceph.rook.io";
|
|
29
|
+
readonly apiVersion: "v1";
|
|
30
|
+
readonly type: "cephclusters";
|
|
31
|
+
};
|
|
32
|
+
readonly CEPH_FILE_SYSTEM: {
|
|
33
|
+
readonly apiGroup: "ceph.rook.io";
|
|
34
|
+
readonly apiVersion: "v1";
|
|
35
|
+
readonly type: "cephfilesystems";
|
|
36
|
+
};
|
|
37
|
+
readonly ARTIFACT: {
|
|
38
|
+
readonly apiGroup: "meta.katanomi.dev";
|
|
39
|
+
readonly apiVersion: "v1alpha1";
|
|
40
|
+
readonly type: "artifacts";
|
|
41
|
+
};
|
|
42
|
+
readonly TDSQL_INSTANCE: {
|
|
43
|
+
readonly type: "instances";
|
|
44
|
+
readonly apiVersion: "v1alpha1";
|
|
45
|
+
readonly apiGroup: "tdsql.alauda.io";
|
|
46
|
+
};
|
|
47
|
+
readonly TDSQL_INSTANCE_BINDING: {
|
|
48
|
+
readonly type: "instancebindings";
|
|
49
|
+
readonly apiVersion: "v1alpha1";
|
|
50
|
+
readonly apiGroup: "tdsql.alauda.io";
|
|
51
|
+
};
|
|
52
|
+
readonly TDSQL_ACCOUNTS: {
|
|
53
|
+
readonly type: "accounts";
|
|
54
|
+
readonly apiVersion: "v1alpha1";
|
|
55
|
+
readonly apiGroup: "tdsql.alauda.io";
|
|
56
|
+
};
|
|
57
|
+
readonly TDSQL_INSTANCE_SET: {
|
|
58
|
+
readonly type: "requests";
|
|
59
|
+
readonly apiVersion: "v1alpha1";
|
|
60
|
+
readonly apiGroup: "tdsql.alauda.io";
|
|
61
|
+
};
|
|
62
|
+
readonly CEPH_BLOCK_POOL: {
|
|
63
|
+
readonly apiGroup: "ceph.rook.io";
|
|
64
|
+
readonly type: "cephblockpools";
|
|
65
|
+
};
|
|
66
|
+
readonly CSI_DRIVER: {
|
|
67
|
+
readonly apiGroup: "storage.k8s.io";
|
|
68
|
+
readonly type: "csidrivers";
|
|
69
|
+
};
|
|
70
|
+
readonly EPHEMERAL_CONTAINERS: {
|
|
71
|
+
readonly type: "ephemeralcontainers";
|
|
72
|
+
};
|
|
73
|
+
readonly APP_CONFIG: {
|
|
74
|
+
readonly apiGroup: "asm.alauda.io";
|
|
75
|
+
readonly apiVersion: "v1alpha1";
|
|
76
|
+
readonly type: "appconfigs";
|
|
77
|
+
};
|
|
78
|
+
readonly CEPH_OBJECT_STORE: {
|
|
79
|
+
readonly apiGroup: "ceph.rook.io";
|
|
80
|
+
readonly type: "cephobjectstores";
|
|
81
|
+
};
|
|
82
|
+
readonly TOPOLVM_CLUSTER: {
|
|
83
|
+
readonly type: "topolvmclusters";
|
|
84
|
+
readonly apiGroup: "topolvm.cybozu.com";
|
|
85
|
+
readonly apiVersion: "v1";
|
|
86
|
+
};
|
|
87
|
+
readonly VLAN: {
|
|
88
|
+
readonly type: "vlans";
|
|
89
|
+
readonly apiGroup: "kubeovn.io";
|
|
90
|
+
};
|
|
91
|
+
readonly PROVIDER_NETWORK: {
|
|
92
|
+
readonly type: "provider-networks";
|
|
93
|
+
readonly apiGroup: "kubeovn.io";
|
|
94
|
+
};
|
|
95
|
+
readonly PRODUCT_UPGRADE: {
|
|
96
|
+
readonly type: "productupgrades";
|
|
97
|
+
readonly apiGroup: "product.alauda.io";
|
|
98
|
+
readonly apiVersion: "v1alpha1";
|
|
99
|
+
};
|
|
100
|
+
readonly INGRESS_CLASS: {
|
|
101
|
+
readonly apiGroup: "networking.k8s.io";
|
|
102
|
+
readonly type: "ingressclasses";
|
|
103
|
+
};
|
|
104
|
+
readonly INGRESS_V1BEAT1: {
|
|
105
|
+
readonly apiGroup: "networking.k8s.io";
|
|
106
|
+
readonly type: "ingresses";
|
|
107
|
+
readonly apiVersion: "v1beta1";
|
|
108
|
+
};
|
|
109
|
+
readonly NAMESPACE_AUDIT: {
|
|
110
|
+
readonly apiGroup: "aiops.alauda.io";
|
|
111
|
+
readonly type: "namespaceaudits";
|
|
112
|
+
};
|
|
113
|
+
readonly OAM_APP_STATUS: {
|
|
114
|
+
readonly apiGroup: "oam.alauda.io";
|
|
115
|
+
readonly apiVersion: "v1alpha1";
|
|
116
|
+
readonly type: "appstatuses";
|
|
117
|
+
};
|
|
118
|
+
readonly OAM_COMPONENT_DEFINITION: {
|
|
119
|
+
readonly apiGroup: "core.oam.dev";
|
|
120
|
+
readonly apiVersion: "v1beta1";
|
|
121
|
+
readonly type: "componentdefinitions";
|
|
122
|
+
};
|
|
123
|
+
readonly OAM_TRAIT_DEFINITION: {
|
|
124
|
+
readonly apiGroup: "core.oam.dev";
|
|
125
|
+
readonly apiVersion: "v1beta1";
|
|
126
|
+
readonly type: "traitdefinitions";
|
|
127
|
+
};
|
|
128
|
+
readonly OAM_APP_REVISION: {
|
|
129
|
+
readonly apiGroup: "core.oam.dev";
|
|
130
|
+
readonly apiVersion: "v1beta1";
|
|
131
|
+
readonly type: "applicationrevisions";
|
|
132
|
+
};
|
|
133
|
+
readonly ALAUDA_BUCKET_REQUEST: {
|
|
134
|
+
readonly apiGroup: "cosi.alauda.io";
|
|
135
|
+
readonly apiVersion: "v1alpha1";
|
|
136
|
+
readonly type: "alaudabucketrequests";
|
|
137
|
+
};
|
|
138
|
+
readonly BUCKET_ACCESS_CLASS: {
|
|
139
|
+
readonly apiGroup: "objectstorage.k8s.io";
|
|
140
|
+
readonly apiVersion: "v1alpha1";
|
|
141
|
+
readonly type: "bucketaccessclasses";
|
|
142
|
+
};
|
|
143
|
+
readonly BUCKET_ACCESS_REQUEST: {
|
|
144
|
+
readonly apiGroup: "objectstorage.k8s.io";
|
|
145
|
+
readonly apiVersion: "v1alpha1";
|
|
146
|
+
readonly type: "bucketaccessrequests";
|
|
147
|
+
};
|
|
148
|
+
readonly GATEWAY_CLASS: {
|
|
149
|
+
readonly apiGroup: "gateway.networking.k8s.io";
|
|
150
|
+
readonly apiVersion: "v1beta1";
|
|
151
|
+
readonly type: "gatewayclasses";
|
|
152
|
+
};
|
|
153
|
+
readonly GATEWAY: {
|
|
154
|
+
readonly apiGroup: "gateway.networking.k8s.io";
|
|
155
|
+
readonly apiVersion: "v1beta1";
|
|
156
|
+
readonly type: "gateways";
|
|
157
|
+
};
|
|
158
|
+
readonly HTTP_ROUTE: {
|
|
159
|
+
readonly apiGroup: "gateway.networking.k8s.io";
|
|
160
|
+
readonly apiVersion: "v1beta1";
|
|
161
|
+
readonly type: "httproutes";
|
|
162
|
+
};
|
|
163
|
+
readonly TCP_ROUTE: {
|
|
164
|
+
readonly apiGroup: "gateway.networking.k8s.io";
|
|
165
|
+
readonly apiVersion: "v1alpha2";
|
|
166
|
+
readonly type: "tcproutes";
|
|
167
|
+
};
|
|
168
|
+
readonly UDP_ROUTE: {
|
|
169
|
+
readonly apiGroup: "gateway.networking.k8s.io";
|
|
170
|
+
readonly apiVersion: "v1alpha2";
|
|
171
|
+
readonly type: "udproutes";
|
|
172
|
+
};
|
|
173
|
+
readonly ALAUDA_ARTIFACT: {
|
|
174
|
+
readonly apiGroup: "app.alauda.io";
|
|
175
|
+
readonly apiVersion: "v1alpha1";
|
|
176
|
+
readonly type: "artifacts";
|
|
177
|
+
};
|
|
178
|
+
readonly ALAUDA_ARTIFACT_VERSION: {
|
|
179
|
+
readonly apiGroup: "app.alauda.io";
|
|
180
|
+
readonly apiVersion: "v1alpha1";
|
|
181
|
+
readonly type: "artifactversions";
|
|
182
|
+
};
|
|
183
|
+
readonly ARTIFACT_UPLOAD_PROCESSOR: {
|
|
184
|
+
readonly apiGroup: "app.alauda.io";
|
|
185
|
+
readonly apiVersion: "v1";
|
|
186
|
+
readonly type: "artifactuploadprocessors";
|
|
187
|
+
};
|
|
188
|
+
readonly GIT_COMMIT: {
|
|
189
|
+
readonly apiGroup: "gitops.app.alauda.io";
|
|
190
|
+
readonly apiVersion: "v1alpha1";
|
|
191
|
+
readonly type: "applications/commit";
|
|
192
|
+
};
|
|
193
|
+
readonly GITOPS_IGNORE_DIFFERENCE: {
|
|
194
|
+
readonly apiGroup: "gitops.app.alauda.io";
|
|
195
|
+
readonly apiVersion: "v1alpha1";
|
|
196
|
+
readonly type: "gitopsignoredifferences";
|
|
197
|
+
};
|
|
198
|
+
readonly GATEKEEPER_CONSTRAINTS: {
|
|
199
|
+
readonly apiGroup: "gatekeeper.alauda.io";
|
|
200
|
+
readonly apiVersion: "v1alpha1";
|
|
201
|
+
readonly type: "constraints";
|
|
202
|
+
};
|
|
203
|
+
readonly ARTIFACT_APP: {
|
|
204
|
+
readonly apiGroup: "app.alauda.io";
|
|
205
|
+
readonly type: "artifacts";
|
|
206
|
+
readonly apiVersion: "v1alpha1";
|
|
207
|
+
};
|
|
208
|
+
readonly ARTIFACT_VERSION: {
|
|
209
|
+
readonly apiGroup: "app.alauda.io";
|
|
210
|
+
readonly type: "artifactversions";
|
|
211
|
+
readonly apiVersion: "v1alpha1";
|
|
212
|
+
};
|
|
213
|
+
readonly APP_PACKAGE_MANIFEST: {
|
|
214
|
+
readonly apiGroup: "app.alauda.io";
|
|
215
|
+
readonly type: "packagemanifests";
|
|
216
|
+
readonly apiVersion: "v1alpha1";
|
|
217
|
+
};
|
|
218
|
+
readonly MINIO_PEER: {
|
|
219
|
+
readonly apiGroup: "minio.min.io";
|
|
220
|
+
readonly apiVersion: "v1alpha1";
|
|
221
|
+
readonly type: "miniopeers";
|
|
222
|
+
};
|
|
223
|
+
readonly GITOPS_APPLICATIONS: {
|
|
224
|
+
readonly apiGroup: "gitops.app.alauda.io";
|
|
225
|
+
readonly type: "applications";
|
|
226
|
+
};
|
|
227
|
+
readonly GIT_BUILD: {
|
|
228
|
+
readonly apiGroup: "build.alauda.io";
|
|
229
|
+
readonly apiVersion: "v1alpha1";
|
|
230
|
+
readonly type: "builds";
|
|
231
|
+
};
|
|
232
|
+
readonly GIT_BUILD_RUN: {
|
|
233
|
+
readonly apiGroup: "build.alauda.io";
|
|
234
|
+
readonly apiVersion: "v1alpha1";
|
|
235
|
+
readonly type: "buildruns";
|
|
236
|
+
};
|
|
237
|
+
readonly GIT_BUILDER_IMAGE_CATEGORY: {
|
|
238
|
+
readonly apiGroup: "build.alauda.io";
|
|
239
|
+
readonly apiVersion: "v1alpha1";
|
|
240
|
+
readonly type: "builderimagecategories";
|
|
241
|
+
};
|
|
242
|
+
};
|