@kustodian/schema 1.3.0 → 1.4.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kustodian/schema",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "JSON Schema definitions for Kustodian YAML validation",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
package/src/cluster.ts CHANGED
@@ -41,6 +41,7 @@ export const kustomization_override_schema = z.object({
41
41
  preservation: z
42
42
  .object({
43
43
  mode: preservation_mode_schema,
44
+ keep_resources: z.array(z.string()).optional(),
44
45
  })
45
46
  .optional(),
46
47
  });
package/src/common.ts CHANGED
@@ -260,6 +260,38 @@ export const namespace_config_schema = z.object({
260
260
 
261
261
  export type NamespaceConfigType = z.infer<typeof namespace_config_schema>;
262
262
 
263
+ /**
264
+ * Base auth configuration for kustomizations.
265
+ * This schema defines common fields that all auth providers share.
266
+ * Plugins (e.g., authelia, authentik) extend validation for provider-specific fields.
267
+ */
268
+ export const auth_config_schema = z.object({
269
+ /** Auth provider plugin name (e.g., 'authelia', 'authentik') */
270
+ provider: z.string().min(1),
271
+ /** Provider-specific auth type (e.g., 'oidc', 'proxy', 'oauth2', 'saml') */
272
+ type: z.string().min(1),
273
+ /** Application identifier (used for client_id, slug, etc.) */
274
+ app_name: z.string().min(1),
275
+ /** Display name for the application */
276
+ app_display_name: z.string().optional(),
277
+ /** Application description */
278
+ app_description: z.string().optional(),
279
+ /** Application icon URL */
280
+ app_icon: z.string().optional(),
281
+ /** Application group/category */
282
+ app_group: z.string().optional(),
283
+ /** Application launch URL */
284
+ app_launch_url: z.string().optional(),
285
+ /** External host for the application */
286
+ external_host: z.string().optional(),
287
+ /** Internal service host (for proxy auth) */
288
+ internal_host: z.string().optional(),
289
+ /** Provider-specific configuration (validated by auth plugins) */
290
+ config: z.record(z.string(), z.unknown()).optional(),
291
+ });
292
+
293
+ export type AuthConfigType = z.infer<typeof auth_config_schema>;
294
+
263
295
  /**
264
296
  * Key-value pairs for substitution values.
265
297
  */
package/src/template.ts CHANGED
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
 
3
3
  import {
4
4
  api_version_schema,
5
+ auth_config_schema,
5
6
  health_check_expr_schema,
6
7
  health_check_schema,
7
8
  metadata_schema,
@@ -73,6 +74,8 @@ export const kustomization_schema = z.object({
73
74
  retry_interval: z.string().optional(),
74
75
  enabled: z.boolean().optional().default(true),
75
76
  preservation: preservation_policy_schema.optional(),
77
+ /** Auth configuration for SSO integration (processed by auth plugins) */
78
+ auth: auth_config_schema.optional(),
76
79
  });
77
80
 
78
81
  export type KustomizationType = z.infer<typeof kustomization_schema>;