@kustodian/schema 1.1.0 → 1.2.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/package.json +1 -1
- package/src/common.ts +18 -0
- package/src/template.ts +2 -0
package/package.json
CHANGED
package/src/common.ts
CHANGED
|
@@ -21,10 +21,27 @@ export const health_check_schema = z.object({
|
|
|
21
21
|
kind: z.string().min(1),
|
|
22
22
|
name: z.string().min(1),
|
|
23
23
|
namespace: z.string().min(1).optional(),
|
|
24
|
+
api_version: z.string().min(1).optional(),
|
|
24
25
|
});
|
|
25
26
|
|
|
26
27
|
export type HealthCheckType = z.infer<typeof health_check_schema>;
|
|
27
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Health check expression configuration using CEL (Common Expression Language).
|
|
31
|
+
* Supports custom health check conditions via CEL expressions.
|
|
32
|
+
*/
|
|
33
|
+
export const health_check_expr_schema = z.object({
|
|
34
|
+
api_version: z.string().min(1),
|
|
35
|
+
kind: z.string().min(1),
|
|
36
|
+
namespace: z.string().min(1).optional(),
|
|
37
|
+
/** CEL expression for when resource is healthy/current */
|
|
38
|
+
current: z.string().min(1).optional(),
|
|
39
|
+
/** CEL expression for when resource has failed */
|
|
40
|
+
failed: z.string().min(1).optional(),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export type HealthCheckExprType = z.infer<typeof health_check_expr_schema>;
|
|
44
|
+
|
|
28
45
|
/**
|
|
29
46
|
* Registry configuration for version substitutions.
|
|
30
47
|
*/
|
|
@@ -45,6 +62,7 @@ export const generic_substitution_schema = z.object({
|
|
|
45
62
|
name: z.string().min(1),
|
|
46
63
|
default: z.string().optional(),
|
|
47
64
|
secret: z.string().optional(),
|
|
65
|
+
preserve_case: z.boolean().optional(),
|
|
48
66
|
});
|
|
49
67
|
|
|
50
68
|
export type GenericSubstitutionType = z.infer<typeof generic_substitution_schema>;
|
package/src/template.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
api_version_schema,
|
|
5
|
+
health_check_expr_schema,
|
|
5
6
|
health_check_schema,
|
|
6
7
|
metadata_schema,
|
|
7
8
|
namespace_config_schema,
|
|
@@ -19,6 +20,7 @@ export const kustomization_schema = z.object({
|
|
|
19
20
|
depends_on: z.array(z.string()).optional(),
|
|
20
21
|
substitutions: z.array(substitution_schema).optional(),
|
|
21
22
|
health_checks: z.array(health_check_schema).optional(),
|
|
23
|
+
health_check_exprs: z.array(health_check_expr_schema).optional(),
|
|
22
24
|
prune: z.boolean().optional().default(true),
|
|
23
25
|
wait: z.boolean().optional().default(true),
|
|
24
26
|
timeout: z.string().optional(),
|