@kustodian/schema 1.4.0 → 2.0.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/dist/cluster.d.ts +1887 -0
- package/dist/cluster.d.ts.map +1 -0
- package/dist/common.d.ts +875 -0
- package/dist/common.d.ts.map +1 -0
- package/{src/index.ts → dist/index.d.ts} +2 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4526 -0
- package/dist/node-list.d.ts +361 -0
- package/dist/node-list.d.ts.map +1 -0
- package/dist/profile.d.ts +166 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/sources.d.ts +338 -0
- package/dist/sources.d.ts.map +1 -0
- package/dist/template.d.ts +2630 -0
- package/dist/template.d.ts.map +1 -0
- package/package.json +15 -8
- package/src/cluster.ts +0 -191
- package/src/common.ts +0 -300
- package/src/node-list.ts +0 -135
- package/src/profile.ts +0 -90
- package/src/sources.ts +0 -142
- package/src/template.ts +0 -132
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* SSH configuration schema.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ssh_config_schema: z.ZodObject<{
|
|
6
|
+
user: z.ZodOptional<z.ZodString>;
|
|
7
|
+
key_path: z.ZodOptional<z.ZodString>;
|
|
8
|
+
known_hosts_path: z.ZodOptional<z.ZodString>;
|
|
9
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
user?: string | undefined;
|
|
12
|
+
key_path?: string | undefined;
|
|
13
|
+
known_hosts_path?: string | undefined;
|
|
14
|
+
port?: number | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
user?: string | undefined;
|
|
17
|
+
key_path?: string | undefined;
|
|
18
|
+
known_hosts_path?: string | undefined;
|
|
19
|
+
port?: number | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export type SshConfigSchemaType = z.infer<typeof ssh_config_schema>;
|
|
22
|
+
/**
|
|
23
|
+
* Kubernetes taint effect.
|
|
24
|
+
*/
|
|
25
|
+
export declare const taint_effect_schema: z.ZodEnum<["NoSchedule", "PreferNoSchedule", "NoExecute"]>;
|
|
26
|
+
export type TaintEffectType = z.infer<typeof taint_effect_schema>;
|
|
27
|
+
/**
|
|
28
|
+
* Kubernetes taint schema.
|
|
29
|
+
*/
|
|
30
|
+
export declare const taint_schema: z.ZodObject<{
|
|
31
|
+
key: z.ZodString;
|
|
32
|
+
value: z.ZodOptional<z.ZodString>;
|
|
33
|
+
effect: z.ZodEnum<["NoSchedule", "PreferNoSchedule", "NoExecute"]>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
key: string;
|
|
36
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
37
|
+
value?: string | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
key: string;
|
|
40
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
41
|
+
value?: string | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
export type TaintSchemaType = z.infer<typeof taint_schema>;
|
|
44
|
+
/**
|
|
45
|
+
* Node role in the cluster.
|
|
46
|
+
*/
|
|
47
|
+
export declare const node_role_schema: z.ZodEnum<["controller", "worker", "controller+worker"]>;
|
|
48
|
+
export type NodeRoleType = z.infer<typeof node_role_schema>;
|
|
49
|
+
/**
|
|
50
|
+
* Single node definition schema (for inline use in NodeList).
|
|
51
|
+
*/
|
|
52
|
+
export declare const node_schema: z.ZodObject<{
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
role: z.ZodEnum<["controller", "worker", "controller+worker"]>;
|
|
55
|
+
address: z.ZodString;
|
|
56
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
57
|
+
ssh: z.ZodOptional<z.ZodObject<{
|
|
58
|
+
user: z.ZodOptional<z.ZodString>;
|
|
59
|
+
key_path: z.ZodOptional<z.ZodString>;
|
|
60
|
+
known_hosts_path: z.ZodOptional<z.ZodString>;
|
|
61
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
user?: string | undefined;
|
|
64
|
+
key_path?: string | undefined;
|
|
65
|
+
known_hosts_path?: string | undefined;
|
|
66
|
+
port?: number | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
user?: string | undefined;
|
|
69
|
+
key_path?: string | undefined;
|
|
70
|
+
known_hosts_path?: string | undefined;
|
|
71
|
+
port?: number | undefined;
|
|
72
|
+
}>>;
|
|
73
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
|
|
74
|
+
taints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
75
|
+
key: z.ZodString;
|
|
76
|
+
value: z.ZodOptional<z.ZodString>;
|
|
77
|
+
effect: z.ZodEnum<["NoSchedule", "PreferNoSchedule", "NoExecute"]>;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
key: string;
|
|
80
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
81
|
+
value?: string | undefined;
|
|
82
|
+
}, {
|
|
83
|
+
key: string;
|
|
84
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
85
|
+
value?: string | undefined;
|
|
86
|
+
}>, "many">>;
|
|
87
|
+
annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
name: string;
|
|
90
|
+
role: "controller" | "worker" | "controller+worker";
|
|
91
|
+
address: string;
|
|
92
|
+
profile?: string | undefined;
|
|
93
|
+
ssh?: {
|
|
94
|
+
user?: string | undefined;
|
|
95
|
+
key_path?: string | undefined;
|
|
96
|
+
known_hosts_path?: string | undefined;
|
|
97
|
+
port?: number | undefined;
|
|
98
|
+
} | undefined;
|
|
99
|
+
labels?: Record<string, string | number | boolean> | undefined;
|
|
100
|
+
taints?: {
|
|
101
|
+
key: string;
|
|
102
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
103
|
+
value?: string | undefined;
|
|
104
|
+
}[] | undefined;
|
|
105
|
+
annotations?: Record<string, string> | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
name: string;
|
|
108
|
+
role: "controller" | "worker" | "controller+worker";
|
|
109
|
+
address: string;
|
|
110
|
+
profile?: string | undefined;
|
|
111
|
+
ssh?: {
|
|
112
|
+
user?: string | undefined;
|
|
113
|
+
key_path?: string | undefined;
|
|
114
|
+
known_hosts_path?: string | undefined;
|
|
115
|
+
port?: number | undefined;
|
|
116
|
+
} | undefined;
|
|
117
|
+
labels?: Record<string, string | number | boolean> | undefined;
|
|
118
|
+
taints?: {
|
|
119
|
+
key: string;
|
|
120
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
121
|
+
value?: string | undefined;
|
|
122
|
+
}[] | undefined;
|
|
123
|
+
annotations?: Record<string, string> | undefined;
|
|
124
|
+
}>;
|
|
125
|
+
export type NodeSchemaType = z.infer<typeof node_schema>;
|
|
126
|
+
/**
|
|
127
|
+
* Node metadata schema (for standalone Node resources).
|
|
128
|
+
*/
|
|
129
|
+
export declare const node_metadata_schema: z.ZodObject<{
|
|
130
|
+
name: z.ZodString;
|
|
131
|
+
cluster: z.ZodString;
|
|
132
|
+
}, "strip", z.ZodTypeAny, {
|
|
133
|
+
name: string;
|
|
134
|
+
cluster: string;
|
|
135
|
+
}, {
|
|
136
|
+
name: string;
|
|
137
|
+
cluster: string;
|
|
138
|
+
}>;
|
|
139
|
+
export type NodeMetadataType = z.infer<typeof node_metadata_schema>;
|
|
140
|
+
/**
|
|
141
|
+
* Node spec schema (for standalone Node resources).
|
|
142
|
+
*/
|
|
143
|
+
export declare const node_spec_schema: z.ZodObject<{
|
|
144
|
+
role: z.ZodEnum<["controller", "worker", "controller+worker"]>;
|
|
145
|
+
address: z.ZodString;
|
|
146
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
147
|
+
ssh: z.ZodOptional<z.ZodObject<{
|
|
148
|
+
user: z.ZodOptional<z.ZodString>;
|
|
149
|
+
key_path: z.ZodOptional<z.ZodString>;
|
|
150
|
+
known_hosts_path: z.ZodOptional<z.ZodString>;
|
|
151
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
}, "strip", z.ZodTypeAny, {
|
|
153
|
+
user?: string | undefined;
|
|
154
|
+
key_path?: string | undefined;
|
|
155
|
+
known_hosts_path?: string | undefined;
|
|
156
|
+
port?: number | undefined;
|
|
157
|
+
}, {
|
|
158
|
+
user?: string | undefined;
|
|
159
|
+
key_path?: string | undefined;
|
|
160
|
+
known_hosts_path?: string | undefined;
|
|
161
|
+
port?: number | undefined;
|
|
162
|
+
}>>;
|
|
163
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
|
|
164
|
+
taints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
165
|
+
key: z.ZodString;
|
|
166
|
+
value: z.ZodOptional<z.ZodString>;
|
|
167
|
+
effect: z.ZodEnum<["NoSchedule", "PreferNoSchedule", "NoExecute"]>;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
key: string;
|
|
170
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
171
|
+
value?: string | undefined;
|
|
172
|
+
}, {
|
|
173
|
+
key: string;
|
|
174
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
175
|
+
value?: string | undefined;
|
|
176
|
+
}>, "many">>;
|
|
177
|
+
annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
178
|
+
}, "strip", z.ZodTypeAny, {
|
|
179
|
+
role: "controller" | "worker" | "controller+worker";
|
|
180
|
+
address: string;
|
|
181
|
+
profile?: string | undefined;
|
|
182
|
+
ssh?: {
|
|
183
|
+
user?: string | undefined;
|
|
184
|
+
key_path?: string | undefined;
|
|
185
|
+
known_hosts_path?: string | undefined;
|
|
186
|
+
port?: number | undefined;
|
|
187
|
+
} | undefined;
|
|
188
|
+
labels?: Record<string, string | number | boolean> | undefined;
|
|
189
|
+
taints?: {
|
|
190
|
+
key: string;
|
|
191
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
192
|
+
value?: string | undefined;
|
|
193
|
+
}[] | undefined;
|
|
194
|
+
annotations?: Record<string, string> | undefined;
|
|
195
|
+
}, {
|
|
196
|
+
role: "controller" | "worker" | "controller+worker";
|
|
197
|
+
address: string;
|
|
198
|
+
profile?: string | undefined;
|
|
199
|
+
ssh?: {
|
|
200
|
+
user?: string | undefined;
|
|
201
|
+
key_path?: string | undefined;
|
|
202
|
+
known_hosts_path?: string | undefined;
|
|
203
|
+
port?: number | undefined;
|
|
204
|
+
} | undefined;
|
|
205
|
+
labels?: Record<string, string | number | boolean> | undefined;
|
|
206
|
+
taints?: {
|
|
207
|
+
key: string;
|
|
208
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
209
|
+
value?: string | undefined;
|
|
210
|
+
}[] | undefined;
|
|
211
|
+
annotations?: Record<string, string> | undefined;
|
|
212
|
+
}>;
|
|
213
|
+
export type NodeSpecType = z.infer<typeof node_spec_schema>;
|
|
214
|
+
/**
|
|
215
|
+
* Standalone Node resource definition.
|
|
216
|
+
* Used for individual node files at clusters/<cluster>/nodes/<node>.yml
|
|
217
|
+
*/
|
|
218
|
+
export declare const node_resource_schema: z.ZodObject<{
|
|
219
|
+
apiVersion: z.ZodLiteral<"kustodian.io/v1">;
|
|
220
|
+
kind: z.ZodLiteral<"Node">;
|
|
221
|
+
metadata: z.ZodObject<{
|
|
222
|
+
name: z.ZodString;
|
|
223
|
+
cluster: z.ZodString;
|
|
224
|
+
}, "strip", z.ZodTypeAny, {
|
|
225
|
+
name: string;
|
|
226
|
+
cluster: string;
|
|
227
|
+
}, {
|
|
228
|
+
name: string;
|
|
229
|
+
cluster: string;
|
|
230
|
+
}>;
|
|
231
|
+
spec: z.ZodObject<{
|
|
232
|
+
role: z.ZodEnum<["controller", "worker", "controller+worker"]>;
|
|
233
|
+
address: z.ZodString;
|
|
234
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
235
|
+
ssh: z.ZodOptional<z.ZodObject<{
|
|
236
|
+
user: z.ZodOptional<z.ZodString>;
|
|
237
|
+
key_path: z.ZodOptional<z.ZodString>;
|
|
238
|
+
known_hosts_path: z.ZodOptional<z.ZodString>;
|
|
239
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
}, "strip", z.ZodTypeAny, {
|
|
241
|
+
user?: string | undefined;
|
|
242
|
+
key_path?: string | undefined;
|
|
243
|
+
known_hosts_path?: string | undefined;
|
|
244
|
+
port?: number | undefined;
|
|
245
|
+
}, {
|
|
246
|
+
user?: string | undefined;
|
|
247
|
+
key_path?: string | undefined;
|
|
248
|
+
known_hosts_path?: string | undefined;
|
|
249
|
+
port?: number | undefined;
|
|
250
|
+
}>>;
|
|
251
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
|
|
252
|
+
taints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
253
|
+
key: z.ZodString;
|
|
254
|
+
value: z.ZodOptional<z.ZodString>;
|
|
255
|
+
effect: z.ZodEnum<["NoSchedule", "PreferNoSchedule", "NoExecute"]>;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
key: string;
|
|
258
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
259
|
+
value?: string | undefined;
|
|
260
|
+
}, {
|
|
261
|
+
key: string;
|
|
262
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
263
|
+
value?: string | undefined;
|
|
264
|
+
}>, "many">>;
|
|
265
|
+
annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
266
|
+
}, "strip", z.ZodTypeAny, {
|
|
267
|
+
role: "controller" | "worker" | "controller+worker";
|
|
268
|
+
address: string;
|
|
269
|
+
profile?: string | undefined;
|
|
270
|
+
ssh?: {
|
|
271
|
+
user?: string | undefined;
|
|
272
|
+
key_path?: string | undefined;
|
|
273
|
+
known_hosts_path?: string | undefined;
|
|
274
|
+
port?: number | undefined;
|
|
275
|
+
} | undefined;
|
|
276
|
+
labels?: Record<string, string | number | boolean> | undefined;
|
|
277
|
+
taints?: {
|
|
278
|
+
key: string;
|
|
279
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
280
|
+
value?: string | undefined;
|
|
281
|
+
}[] | undefined;
|
|
282
|
+
annotations?: Record<string, string> | undefined;
|
|
283
|
+
}, {
|
|
284
|
+
role: "controller" | "worker" | "controller+worker";
|
|
285
|
+
address: string;
|
|
286
|
+
profile?: string | undefined;
|
|
287
|
+
ssh?: {
|
|
288
|
+
user?: string | undefined;
|
|
289
|
+
key_path?: string | undefined;
|
|
290
|
+
known_hosts_path?: string | undefined;
|
|
291
|
+
port?: number | undefined;
|
|
292
|
+
} | undefined;
|
|
293
|
+
labels?: Record<string, string | number | boolean> | undefined;
|
|
294
|
+
taints?: {
|
|
295
|
+
key: string;
|
|
296
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
297
|
+
value?: string | undefined;
|
|
298
|
+
}[] | undefined;
|
|
299
|
+
annotations?: Record<string, string> | undefined;
|
|
300
|
+
}>;
|
|
301
|
+
}, "strip", z.ZodTypeAny, {
|
|
302
|
+
kind: "Node";
|
|
303
|
+
apiVersion: "kustodian.io/v1";
|
|
304
|
+
metadata: {
|
|
305
|
+
name: string;
|
|
306
|
+
cluster: string;
|
|
307
|
+
};
|
|
308
|
+
spec: {
|
|
309
|
+
role: "controller" | "worker" | "controller+worker";
|
|
310
|
+
address: string;
|
|
311
|
+
profile?: string | undefined;
|
|
312
|
+
ssh?: {
|
|
313
|
+
user?: string | undefined;
|
|
314
|
+
key_path?: string | undefined;
|
|
315
|
+
known_hosts_path?: string | undefined;
|
|
316
|
+
port?: number | undefined;
|
|
317
|
+
} | undefined;
|
|
318
|
+
labels?: Record<string, string | number | boolean> | undefined;
|
|
319
|
+
taints?: {
|
|
320
|
+
key: string;
|
|
321
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
322
|
+
value?: string | undefined;
|
|
323
|
+
}[] | undefined;
|
|
324
|
+
annotations?: Record<string, string> | undefined;
|
|
325
|
+
};
|
|
326
|
+
}, {
|
|
327
|
+
kind: "Node";
|
|
328
|
+
apiVersion: "kustodian.io/v1";
|
|
329
|
+
metadata: {
|
|
330
|
+
name: string;
|
|
331
|
+
cluster: string;
|
|
332
|
+
};
|
|
333
|
+
spec: {
|
|
334
|
+
role: "controller" | "worker" | "controller+worker";
|
|
335
|
+
address: string;
|
|
336
|
+
profile?: string | undefined;
|
|
337
|
+
ssh?: {
|
|
338
|
+
user?: string | undefined;
|
|
339
|
+
key_path?: string | undefined;
|
|
340
|
+
known_hosts_path?: string | undefined;
|
|
341
|
+
port?: number | undefined;
|
|
342
|
+
} | undefined;
|
|
343
|
+
labels?: Record<string, string | number | boolean> | undefined;
|
|
344
|
+
taints?: {
|
|
345
|
+
key: string;
|
|
346
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
347
|
+
value?: string | undefined;
|
|
348
|
+
}[] | undefined;
|
|
349
|
+
annotations?: Record<string, string> | undefined;
|
|
350
|
+
};
|
|
351
|
+
}>;
|
|
352
|
+
export type NodeResourceType = z.infer<typeof node_resource_schema>;
|
|
353
|
+
/**
|
|
354
|
+
* Validates a Node resource and returns the result.
|
|
355
|
+
*/
|
|
356
|
+
export declare function validate_node_resource(data: unknown): z.SafeParseReturnType<unknown, NodeResourceType>;
|
|
357
|
+
/**
|
|
358
|
+
* Converts a Node resource to a NodeType for internal use.
|
|
359
|
+
*/
|
|
360
|
+
export declare function node_resource_to_node(resource: NodeResourceType): NodeSchemaType;
|
|
361
|
+
//# sourceMappingURL=node-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-list.d.ts","sourceRoot":"","sources":["../src/node-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;EAK5B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,mBAAmB,4DAA0D,CAAC;AAE3F,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;EAIvB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,gBAAgB,0DAAwD,CAAC;AAEtF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAStB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;EAG/B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ3B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK/B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEpE;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,OAAO,GACZ,CAAC,CAAC,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAElD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,cAAc,CAwBhF"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { taint_schema } from './node-list.js';
|
|
3
|
+
/**
|
|
4
|
+
* Node profile specification schema.
|
|
5
|
+
* Defines reusable configuration for labels, taints, and annotations.
|
|
6
|
+
*/
|
|
7
|
+
export declare const node_profile_spec_schema: z.ZodObject<{
|
|
8
|
+
name: z.ZodOptional<z.ZodString>;
|
|
9
|
+
description: z.ZodOptional<z.ZodString>;
|
|
10
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
|
|
11
|
+
taints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12
|
+
key: z.ZodString;
|
|
13
|
+
value: z.ZodOptional<z.ZodString>;
|
|
14
|
+
effect: z.ZodEnum<["NoSchedule", "PreferNoSchedule", "NoExecute"]>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
key: string;
|
|
17
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
18
|
+
value?: string | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
key: string;
|
|
21
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
22
|
+
value?: string | undefined;
|
|
23
|
+
}>, "many">>;
|
|
24
|
+
annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
labels?: Record<string, string | number | boolean> | undefined;
|
|
28
|
+
taints?: {
|
|
29
|
+
key: string;
|
|
30
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
31
|
+
value?: string | undefined;
|
|
32
|
+
}[] | undefined;
|
|
33
|
+
annotations?: Record<string, string> | undefined;
|
|
34
|
+
description?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
name?: string | undefined;
|
|
37
|
+
labels?: Record<string, string | number | boolean> | undefined;
|
|
38
|
+
taints?: {
|
|
39
|
+
key: string;
|
|
40
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
41
|
+
value?: string | undefined;
|
|
42
|
+
}[] | undefined;
|
|
43
|
+
annotations?: Record<string, string> | undefined;
|
|
44
|
+
description?: string | undefined;
|
|
45
|
+
}>;
|
|
46
|
+
export type NodeProfileSpecType = z.infer<typeof node_profile_spec_schema>;
|
|
47
|
+
/**
|
|
48
|
+
* Node profile metadata schema.
|
|
49
|
+
*/
|
|
50
|
+
export declare const node_profile_metadata_schema: z.ZodObject<{
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
name: string;
|
|
54
|
+
}, {
|
|
55
|
+
name: string;
|
|
56
|
+
}>;
|
|
57
|
+
export type NodeProfileMetadataType = z.infer<typeof node_profile_metadata_schema>;
|
|
58
|
+
/**
|
|
59
|
+
* Standalone NodeProfile resource definition.
|
|
60
|
+
* Used for profile files at profiles/<profile-name>.yaml
|
|
61
|
+
*/
|
|
62
|
+
export declare const node_profile_resource_schema: z.ZodObject<{
|
|
63
|
+
apiVersion: z.ZodLiteral<"kustodian.io/v1">;
|
|
64
|
+
kind: z.ZodLiteral<"NodeProfile">;
|
|
65
|
+
metadata: z.ZodObject<{
|
|
66
|
+
name: z.ZodString;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
name: string;
|
|
69
|
+
}, {
|
|
70
|
+
name: string;
|
|
71
|
+
}>;
|
|
72
|
+
spec: z.ZodObject<{
|
|
73
|
+
name: z.ZodOptional<z.ZodString>;
|
|
74
|
+
description: z.ZodOptional<z.ZodString>;
|
|
75
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
|
|
76
|
+
taints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
77
|
+
key: z.ZodString;
|
|
78
|
+
value: z.ZodOptional<z.ZodString>;
|
|
79
|
+
effect: z.ZodEnum<["NoSchedule", "PreferNoSchedule", "NoExecute"]>;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
key: string;
|
|
82
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
83
|
+
value?: string | undefined;
|
|
84
|
+
}, {
|
|
85
|
+
key: string;
|
|
86
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
87
|
+
value?: string | undefined;
|
|
88
|
+
}>, "many">>;
|
|
89
|
+
annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
name?: string | undefined;
|
|
92
|
+
labels?: Record<string, string | number | boolean> | undefined;
|
|
93
|
+
taints?: {
|
|
94
|
+
key: string;
|
|
95
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
96
|
+
value?: string | undefined;
|
|
97
|
+
}[] | undefined;
|
|
98
|
+
annotations?: Record<string, string> | undefined;
|
|
99
|
+
description?: string | undefined;
|
|
100
|
+
}, {
|
|
101
|
+
name?: string | undefined;
|
|
102
|
+
labels?: Record<string, string | number | boolean> | undefined;
|
|
103
|
+
taints?: {
|
|
104
|
+
key: string;
|
|
105
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
106
|
+
value?: string | undefined;
|
|
107
|
+
}[] | undefined;
|
|
108
|
+
annotations?: Record<string, string> | undefined;
|
|
109
|
+
description?: string | undefined;
|
|
110
|
+
}>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
kind: "NodeProfile";
|
|
113
|
+
apiVersion: "kustodian.io/v1";
|
|
114
|
+
metadata: {
|
|
115
|
+
name: string;
|
|
116
|
+
};
|
|
117
|
+
spec: {
|
|
118
|
+
name?: string | undefined;
|
|
119
|
+
labels?: Record<string, string | number | boolean> | undefined;
|
|
120
|
+
taints?: {
|
|
121
|
+
key: string;
|
|
122
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
123
|
+
value?: string | undefined;
|
|
124
|
+
}[] | undefined;
|
|
125
|
+
annotations?: Record<string, string> | undefined;
|
|
126
|
+
description?: string | undefined;
|
|
127
|
+
};
|
|
128
|
+
}, {
|
|
129
|
+
kind: "NodeProfile";
|
|
130
|
+
apiVersion: "kustodian.io/v1";
|
|
131
|
+
metadata: {
|
|
132
|
+
name: string;
|
|
133
|
+
};
|
|
134
|
+
spec: {
|
|
135
|
+
name?: string | undefined;
|
|
136
|
+
labels?: Record<string, string | number | boolean> | undefined;
|
|
137
|
+
taints?: {
|
|
138
|
+
key: string;
|
|
139
|
+
effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
|
|
140
|
+
value?: string | undefined;
|
|
141
|
+
}[] | undefined;
|
|
142
|
+
annotations?: Record<string, string> | undefined;
|
|
143
|
+
description?: string | undefined;
|
|
144
|
+
};
|
|
145
|
+
}>;
|
|
146
|
+
export type NodeProfileResourceType = z.infer<typeof node_profile_resource_schema>;
|
|
147
|
+
/**
|
|
148
|
+
* Validates a NodeProfile resource and returns the result.
|
|
149
|
+
*/
|
|
150
|
+
export declare function validate_node_profile_resource(data: unknown): z.SafeParseReturnType<unknown, NodeProfileResourceType>;
|
|
151
|
+
/**
|
|
152
|
+
* Internal node profile type for use after loading.
|
|
153
|
+
*/
|
|
154
|
+
export interface NodeProfileType {
|
|
155
|
+
name: string;
|
|
156
|
+
display_name?: string;
|
|
157
|
+
description?: string;
|
|
158
|
+
labels?: Record<string, string | boolean | number>;
|
|
159
|
+
taints?: z.infer<typeof taint_schema>[];
|
|
160
|
+
annotations?: Record<string, string>;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Converts a NodeProfile resource to a NodeProfileType for internal use.
|
|
164
|
+
*/
|
|
165
|
+
export declare function node_profile_resource_to_profile(resource: NodeProfileResourceType): NodeProfileType;
|
|
166
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMnC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;EAEvC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEnF;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKvC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEnF;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,OAAO,GACZ,CAAC,CAAC,mBAAmB,CAAC,OAAO,EAAE,uBAAuB,CAAC,CAEzD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;IACnD,MAAM,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,EAAE,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,uBAAuB,GAChC,eAAe,CAsBjB"}
|