@f5-sales-demo/pi-resource-management 22.8.1 → 22.8.3

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,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@f5-sales-demo/pi-resource-management",
4
- "version": "22.8.1",
4
+ "version": "22.8.3",
5
5
  "description": "Shared resource management for F5 XC manifest parsing, validation, diff, and CRUD operations",
6
6
  "homepage": "https://github.com/f5-sales-demo/xcsh",
7
7
  "author": "Robin Mordasiewicz",
@@ -1,6 +1,6 @@
1
1
  // AUTO-GENERATED by scripts/generate-defaults.ts — DO NOT EDIT BY HAND.
2
2
  // Per-kind defaults knowledge for minimum-settings export. Regenerate with: bun run generate-defaults
3
- // Source: https://github.com/f5-sales-demo/api-specs-enriched/releases/download/v4.0.0/minimal-export-defaults.json (api-specs-enriched 4.0.0)
3
+ // Source: https://github.com/f5-sales-demo/api-specs-enriched/releases/download/v10.0.0/minimal-export-defaults.json (api-specs-enriched 10.0.0)
4
4
  import type { KindDefaultsMetadata } from "./defaults-metadata";
5
5
 
6
6
  export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
@@ -162,6 +162,9 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
162
162
  "spec.detection_settings.enable_threat_campaigns": ["disable_threat_campaigns"],
163
163
  "spec.detection_settings.signature_selection_setting.attack_type_settings": ["default_attack_type_settings"],
164
164
  "spec.detection_settings.signature_selection_setting.default_attack_type_settings": ["attack_type_settings"],
165
+ "spec.detection_settings.signature_selection_setting.default_signature_setting": [
166
+ "signature_settings_by_accuracy",
167
+ ],
165
168
  "spec.detection_settings.signature_selection_setting.high_medium_accuracy_signatures": [
166
169
  "high_medium_low_accuracy_signatures",
167
170
  "only_high_accuracy_signatures",
@@ -174,6 +177,9 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
174
177
  "high_medium_accuracy_signatures",
175
178
  "high_medium_low_accuracy_signatures",
176
179
  ],
180
+ "spec.detection_settings.signature_selection_setting.signature_settings_by_accuracy": [
181
+ "default_signature_setting",
182
+ ],
177
183
  "spec.detection_settings.stage_new_and_updated_signatures": ["disable_staging", "stage_new_signatures"],
178
184
  "spec.detection_settings.stage_new_signatures": ["disable_staging", "stage_new_and_updated_signatures"],
179
185
  "spec.detection_settings.violation_settings": ["default_violation_settings"],
@@ -502,6 +508,12 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
502
508
  "spec.kubernetes_upgrade_drain.disable_upgrade_drain": ["enable_upgrade_drain"],
503
509
  "spec.kubernetes_upgrade_drain.enable_upgrade_drain": ["disable_upgrade_drain"],
504
510
  "spec.kubernetes_upgrade_drain.enable_upgrade_drain.disable_vega_upgrade_mode": ["enable_vega_upgrade_mode"],
511
+ "spec.kubernetes_upgrade_drain.enable_upgrade_drain.drain_max_unavailable_node_count": [
512
+ "drain_max_unavailable_node_percentage",
513
+ ],
514
+ "spec.kubernetes_upgrade_drain.enable_upgrade_drain.drain_max_unavailable_node_percentage": [
515
+ "drain_max_unavailable_node_count",
516
+ ],
505
517
  "spec.kubernetes_upgrade_drain.enable_upgrade_drain.enable_vega_upgrade_mode": ["disable_vega_upgrade_mode"],
506
518
  "spec.log_receiver": ["logs_streaming_disabled"],
507
519
  "spec.logs_streaming_disabled": ["log_receiver"],
@@ -587,6 +599,8 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
587
599
  "spec.voltstack_cluster_ar.sm_connection_public_ip": ["sm_connection_pvt_ip"],
588
600
  "spec.voltstack_cluster_ar.sm_connection_pvt_ip": ["sm_connection_public_ip"],
589
601
  "spec.voltstack_cluster_ar.storage_class_list": ["default_storage"],
602
+ "spec.waf_signatures.automatic": ["manual"],
603
+ "spec.waf_signatures.manual": ["automatic"],
590
604
  },
591
605
  },
592
606
  certificate: {
@@ -1137,9 +1151,11 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
1137
1151
  "spec.unhealthy_threshold",
1138
1152
  ],
1139
1153
  fieldConflicts: {
1154
+ "spec.default_jitter": ["jitter_percent"],
1140
1155
  "spec.http_health_check": ["tcp_health_check", "udp_icmp_health_check"],
1141
1156
  "spec.http_health_check.host_header": ["use_origin_server_name"],
1142
1157
  "spec.http_health_check.use_origin_server_name": ["host_header"],
1158
+ "spec.jitter_percent": ["default_jitter"],
1143
1159
  "spec.tcp_health_check": ["http_health_check", "udp_icmp_health_check"],
1144
1160
  "spec.udp_icmp_health_check": ["http_health_check", "tcp_health_check"],
1145
1161
  },
@@ -1238,7 +1254,9 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
1238
1254
  minimumConfigFields: [
1239
1255
  "spec.active_service_policies.policies",
1240
1256
  "spec.advertise_custom.advertise_where",
1257
+ "spec.advertise_dualstack_on_public.public_ip.name",
1241
1258
  "spec.advertise_on_public.public_ip.name",
1259
+ "spec.advertise_v6_on_public.public_ip.name",
1242
1260
  "spec.api_rate_limit.custom_ip_allowed_list.rate_limiter_allowed_prefixes",
1243
1261
  "spec.api_specification.api_definition.name",
1244
1262
  "spec.api_specification.validation_all_spec_endpoints.fall_through_mode.fall_through_mode_custom.open_api_validation_rules",
@@ -1250,9 +1268,12 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
1250
1268
  "spec.app_firewall.name",
1251
1269
  "spec.bot_defense.policy.js_insertion_rules.rules",
1252
1270
  "spec.bot_defense.policy.protected_app_endpoints",
1253
- "spec.bot_defense_advanced.js_insertion_rules.rules",
1254
- "spec.bot_defense_advanced.mobile.name",
1255
- "spec.bot_defense_advanced.web.name",
1271
+ "spec.bot_defense_advanced_protection.both_web_and_mobile.js_insertion_rules.rules",
1272
+ "spec.bot_defense_advanced_protection.both_web_and_mobile.mobile.name",
1273
+ "spec.bot_defense_advanced_protection.both_web_and_mobile.web.name",
1274
+ "spec.bot_defense_advanced_protection.mobile_only.mobile.name",
1275
+ "spec.bot_defense_advanced_protection.web_only.js_insertion_rules.rules",
1276
+ "spec.bot_defense_advanced_protection.web_only.web.name",
1256
1277
  "spec.captcha_challenge.cookie_expiry",
1257
1278
  "spec.client_side_defense.policy.js_insertion_rules.rules",
1258
1279
  "spec.cookie_stickiness.name",
@@ -1325,9 +1346,41 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
1325
1346
  ],
1326
1347
  fieldConflicts: {
1327
1348
  "spec.active_service_policies": ["no_service_policies", "service_policies_from_namespace"],
1328
- "spec.advertise_custom": ["advertise_on_public", "advertise_on_public_default_vip", "do_not_advertise"],
1329
- "spec.advertise_on_public": ["advertise_custom", "advertise_on_public_default_vip", "do_not_advertise"],
1330
- "spec.advertise_on_public_default_vip": ["advertise_custom", "advertise_on_public", "do_not_advertise"],
1349
+ "spec.advertise_custom": [
1350
+ "advertise_dualstack_on_public",
1351
+ "advertise_on_public",
1352
+ "advertise_on_public_default_vip",
1353
+ "advertise_v6_on_public",
1354
+ "do_not_advertise",
1355
+ ],
1356
+ "spec.advertise_dualstack_on_public": [
1357
+ "advertise_custom",
1358
+ "advertise_on_public",
1359
+ "advertise_on_public_default_vip",
1360
+ "advertise_v6_on_public",
1361
+ "do_not_advertise",
1362
+ ],
1363
+ "spec.advertise_on_public": [
1364
+ "advertise_custom",
1365
+ "advertise_dualstack_on_public",
1366
+ "advertise_on_public_default_vip",
1367
+ "advertise_v6_on_public",
1368
+ "do_not_advertise",
1369
+ ],
1370
+ "spec.advertise_on_public_default_vip": [
1371
+ "advertise_custom",
1372
+ "advertise_dualstack_on_public",
1373
+ "advertise_on_public",
1374
+ "advertise_v6_on_public",
1375
+ "do_not_advertise",
1376
+ ],
1377
+ "spec.advertise_v6_on_public": [
1378
+ "advertise_custom",
1379
+ "advertise_dualstack_on_public",
1380
+ "advertise_on_public",
1381
+ "advertise_on_public_default_vip",
1382
+ "do_not_advertise",
1383
+ ],
1331
1384
  "spec.api_rate_limit": ["disable_rate_limit", "rate_limit"],
1332
1385
  "spec.api_rate_limit.bypass_rate_limiting_rules": [
1333
1386
  "custom_ip_allowed_list",
@@ -1414,7 +1467,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
1414
1467
  "spec.api_testing.every_month": ["every_day", "every_week"],
1415
1468
  "spec.api_testing.every_week": ["every_day", "every_month"],
1416
1469
  "spec.app_firewall": ["disable_waf"],
1417
- "spec.bot_defense": ["bot_defense_advanced", "disable_bot_defense"],
1470
+ "spec.bot_defense": ["bot_defense_advanced_protection", "disable_bot_defense"],
1418
1471
  "spec.bot_defense.disable_cors_support": ["enable_cors_support"],
1419
1472
  "spec.bot_defense.enable_cors_support": ["disable_cors_support"],
1420
1473
  "spec.bot_defense.policy.disable_js_insert": [
@@ -1439,29 +1492,52 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
1439
1492
  "js_insert_all_pages_except",
1440
1493
  ],
1441
1494
  "spec.bot_defense.policy.mobile_sdk_config": ["disable_mobile_sdk"],
1442
- "spec.bot_defense_advanced": ["bot_defense", "disable_bot_defense"],
1443
- "spec.bot_defense_advanced.disable_js_insert": [
1495
+ "spec.bot_defense_advanced_protection": ["bot_defense", "disable_bot_defense"],
1496
+ "spec.bot_defense_advanced_protection.both_web_and_mobile": ["mobile_only", "web_only"],
1497
+ "spec.bot_defense_advanced_protection.both_web_and_mobile.disable_js_insert": [
1498
+ "js_insert_all_pages",
1499
+ "js_insert_all_pages_except",
1500
+ "js_insertion_rules",
1501
+ ],
1502
+ "spec.bot_defense_advanced_protection.both_web_and_mobile.disable_mobile_sdk": ["mobile_sdk_config"],
1503
+ "spec.bot_defense_advanced_protection.both_web_and_mobile.js_insert_all_pages": [
1504
+ "disable_js_insert",
1505
+ "js_insert_all_pages_except",
1506
+ "js_insertion_rules",
1507
+ ],
1508
+ "spec.bot_defense_advanced_protection.both_web_and_mobile.js_insert_all_pages_except": [
1509
+ "disable_js_insert",
1510
+ "js_insert_all_pages",
1511
+ "js_insertion_rules",
1512
+ ],
1513
+ "spec.bot_defense_advanced_protection.both_web_and_mobile.js_insertion_rules": [
1514
+ "disable_js_insert",
1515
+ "js_insert_all_pages",
1516
+ "js_insert_all_pages_except",
1517
+ ],
1518
+ "spec.bot_defense_advanced_protection.both_web_and_mobile.mobile_sdk_config": ["disable_mobile_sdk"],
1519
+ "spec.bot_defense_advanced_protection.mobile_only": ["both_web_and_mobile", "web_only"],
1520
+ "spec.bot_defense_advanced_protection.web_only": ["both_web_and_mobile", "mobile_only"],
1521
+ "spec.bot_defense_advanced_protection.web_only.disable_js_insert": [
1444
1522
  "js_insert_all_pages",
1445
1523
  "js_insert_all_pages_except",
1446
1524
  "js_insertion_rules",
1447
1525
  ],
1448
- "spec.bot_defense_advanced.disable_mobile_sdk": ["mobile_sdk_config"],
1449
- "spec.bot_defense_advanced.js_insert_all_pages": [
1526
+ "spec.bot_defense_advanced_protection.web_only.js_insert_all_pages": [
1450
1527
  "disable_js_insert",
1451
1528
  "js_insert_all_pages_except",
1452
1529
  "js_insertion_rules",
1453
1530
  ],
1454
- "spec.bot_defense_advanced.js_insert_all_pages_except": [
1531
+ "spec.bot_defense_advanced_protection.web_only.js_insert_all_pages_except": [
1455
1532
  "disable_js_insert",
1456
1533
  "js_insert_all_pages",
1457
1534
  "js_insertion_rules",
1458
1535
  ],
1459
- "spec.bot_defense_advanced.js_insertion_rules": [
1536
+ "spec.bot_defense_advanced_protection.web_only.js_insertion_rules": [
1460
1537
  "disable_js_insert",
1461
1538
  "js_insert_all_pages",
1462
1539
  "js_insert_all_pages_except",
1463
1540
  ],
1464
- "spec.bot_defense_advanced.mobile_sdk_config": ["disable_mobile_sdk"],
1465
1541
  "spec.caching_policy": ["disable_caching"],
1466
1542
  "spec.caching_policy.default_cache_action.cache_disabled": ["cache_ttl_default", "cache_ttl_override"],
1467
1543
  "spec.caching_policy.default_cache_action.cache_ttl_default": ["cache_disabled", "cache_ttl_override"],
@@ -1583,7 +1659,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
1583
1659
  "spec.disable_api_definition": ["api_specification"],
1584
1660
  "spec.disable_api_discovery": ["enable_api_discovery"],
1585
1661
  "spec.disable_api_testing": ["api_testing"],
1586
- "spec.disable_bot_defense": ["bot_defense", "bot_defense_advanced"],
1662
+ "spec.disable_bot_defense": ["bot_defense", "bot_defense_advanced_protection"],
1587
1663
  "spec.disable_caching": ["caching_policy"],
1588
1664
  "spec.disable_client_side_defense": ["client_side_defense"],
1589
1665
  "spec.disable_ip_reputation": ["enable_ip_reputation"],
@@ -1593,7 +1669,13 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
1593
1669
  "spec.disable_threat_mesh": ["enable_threat_mesh"],
1594
1670
  "spec.disable_trust_client_ip_headers": ["enable_trust_client_ip_headers"],
1595
1671
  "spec.disable_waf": ["app_firewall"],
1596
- "spec.do_not_advertise": ["advertise_custom", "advertise_on_public", "advertise_on_public_default_vip"],
1672
+ "spec.do_not_advertise": [
1673
+ "advertise_custom",
1674
+ "advertise_dualstack_on_public",
1675
+ "advertise_on_public",
1676
+ "advertise_on_public_default_vip",
1677
+ "advertise_v6_on_public",
1678
+ ],
1597
1679
  "spec.enable_api_discovery": ["disable_api_discovery"],
1598
1680
  "spec.enable_api_discovery.api_crawler.api_crawler_config": ["disable_api_crawler"],
1599
1681
  "spec.enable_api_discovery.api_crawler.disable_api_crawler": ["api_crawler_config"],
@@ -2119,11 +2201,13 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2119
2201
  "spec.custom_proxy.proxy_port",
2120
2202
  "spec.dc_cluster_group_sli.name",
2121
2203
  "spec.dc_cluster_group_slo.name",
2204
+ "spec.eks_k8s.enable_anti_affinity.rules",
2122
2205
  "spec.local_vrf.sli_config.static_routes.static_routes",
2123
2206
  "spec.local_vrf.sli_config.static_v6_routes.static_routes",
2124
2207
  "spec.local_vrf.slo_config.static_routes.static_routes",
2125
2208
  "spec.local_vrf.slo_config.static_v6_routes.static_routes",
2126
2209
  "spec.log_receiver_with_net.log_receiver.name",
2210
+ "spec.private_adn.private_adn",
2127
2211
  "spec.site_mesh_group_on_slo.site_mesh_group.name",
2128
2212
  "spec.upgrade_settings.kubernetes_upgrade_drain.enable_upgrade_drain.drain_node_timeout",
2129
2213
  ],
@@ -2135,6 +2219,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2135
2219
  "spec.aws": [
2136
2220
  "azure",
2137
2221
  "baremetal",
2222
+ "eks_k8s",
2138
2223
  "equinix",
2139
2224
  "gcp",
2140
2225
  "kvm",
@@ -2147,6 +2232,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2147
2232
  "spec.azure": [
2148
2233
  "aws",
2149
2234
  "baremetal",
2235
+ "eks_k8s",
2150
2236
  "equinix",
2151
2237
  "gcp",
2152
2238
  "kvm",
@@ -2159,6 +2245,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2159
2245
  "spec.baremetal": [
2160
2246
  "aws",
2161
2247
  "azure",
2248
+ "eks_k8s",
2162
2249
  "equinix",
2163
2250
  "gcp",
2164
2251
  "kvm",
@@ -2170,7 +2257,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2170
2257
  ],
2171
2258
  "spec.block_all_services": ["blocked_services"],
2172
2259
  "spec.blocked_services": ["block_all_services"],
2173
- "spec.custom_proxy": ["f5_proxy"],
2260
+ "spec.custom_proxy": ["f5_proxy", "private_adn"],
2174
2261
  "spec.custom_proxy.disable_re_tunnel": ["enable_re_tunnel"],
2175
2262
  "spec.custom_proxy.enable_re_tunnel": ["disable_re_tunnel"],
2176
2263
  "spec.custom_proxy.password.blindfold_secret_info": ["clear_secret_info"],
@@ -2187,6 +2274,21 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2187
2274
  "spec.dns_ntp_config.custom_ntp": ["f5_ntp_default"],
2188
2275
  "spec.dns_ntp_config.f5_dns_default": ["custom_dns"],
2189
2276
  "spec.dns_ntp_config.f5_ntp_default": ["custom_ntp"],
2277
+ "spec.eks_k8s": [
2278
+ "aws",
2279
+ "azure",
2280
+ "baremetal",
2281
+ "equinix",
2282
+ "gcp",
2283
+ "kvm",
2284
+ "nutanix",
2285
+ "oci",
2286
+ "openshift_virtualization",
2287
+ "openstack",
2288
+ "vmware",
2289
+ ],
2290
+ "spec.eks_k8s.disable_anti_affinity": ["enable_anti_affinity"],
2291
+ "spec.eks_k8s.enable_anti_affinity": ["disable_anti_affinity"],
2190
2292
  "spec.enable_advanced_delivery": ["disable_advanced_delivery"],
2191
2293
  "spec.enable_ha": ["disable_ha"],
2192
2294
  "spec.enable_log_anonymization": ["disable_log_anonymization"],
@@ -2196,6 +2298,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2196
2298
  "aws",
2197
2299
  "azure",
2198
2300
  "baremetal",
2301
+ "eks_k8s",
2199
2302
  "gcp",
2200
2303
  "kvm",
2201
2304
  "nutanix",
@@ -2204,11 +2307,12 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2204
2307
  "openstack",
2205
2308
  "vmware",
2206
2309
  ],
2207
- "spec.f5_proxy": ["custom_proxy"],
2310
+ "spec.f5_proxy": ["custom_proxy", "private_adn"],
2208
2311
  "spec.gcp": [
2209
2312
  "aws",
2210
2313
  "azure",
2211
2314
  "baremetal",
2315
+ "eks_k8s",
2212
2316
  "equinix",
2213
2317
  "kvm",
2214
2318
  "nutanix",
@@ -2221,6 +2325,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2221
2325
  "aws",
2222
2326
  "azure",
2223
2327
  "baremetal",
2328
+ "eks_k8s",
2224
2329
  "equinix",
2225
2330
  "gcp",
2226
2331
  "nutanix",
@@ -2254,6 +2359,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2254
2359
  "aws",
2255
2360
  "azure",
2256
2361
  "baremetal",
2362
+ "eks_k8s",
2257
2363
  "equinix",
2258
2364
  "gcp",
2259
2365
  "kvm",
@@ -2266,6 +2372,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2266
2372
  "aws",
2267
2373
  "azure",
2268
2374
  "baremetal",
2375
+ "eks_k8s",
2269
2376
  "equinix",
2270
2377
  "gcp",
2271
2378
  "kvm",
@@ -2280,6 +2387,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2280
2387
  "aws",
2281
2388
  "azure",
2282
2389
  "baremetal",
2390
+ "eks_k8s",
2283
2391
  "equinix",
2284
2392
  "gcp",
2285
2393
  "kvm",
@@ -2292,6 +2400,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2292
2400
  "aws",
2293
2401
  "azure",
2294
2402
  "baremetal",
2403
+ "eks_k8s",
2295
2404
  "equinix",
2296
2405
  "gcp",
2297
2406
  "kvm",
@@ -2306,8 +2415,10 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2306
2415
  "spec.performance_enhancement_mode.perf_mode_l7_enhanced": ["perf_mode_l3_enhanced"],
2307
2416
  "spec.performance_enhancement_mode.perf_mode_l7_enhanced.jumbo_disabled": ["jumbo_enabled"],
2308
2417
  "spec.performance_enhancement_mode.perf_mode_l7_enhanced.jumbo_enabled": ["jumbo_disabled"],
2309
- "spec.re_select.geo_proximity": ["specific_re"],
2310
- "spec.re_select.specific_re": ["geo_proximity"],
2418
+ "spec.private_adn": ["custom_proxy", "f5_proxy"],
2419
+ "spec.re_select.geo_proximity": ["specific_geography", "specific_re"],
2420
+ "spec.re_select.specific_geography": ["geo_proximity", "specific_re"],
2421
+ "spec.re_select.specific_re": ["geo_proximity", "specific_geography"],
2311
2422
  "spec.site_mesh_group_on_slo": ["dc_cluster_group_slo", "no_s2s_connectivity_slo"],
2312
2423
  "spec.site_mesh_group_on_slo.no_site_mesh_group": ["site_mesh_group"],
2313
2424
  "spec.site_mesh_group_on_slo.site_mesh_group": ["no_site_mesh_group"],
@@ -2317,11 +2428,19 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2317
2428
  "spec.software_settings.os.operating_system_version": ["default_os_version"],
2318
2429
  "spec.software_settings.sw.default_sw_version": ["volterra_software_version"],
2319
2430
  "spec.software_settings.sw.volterra_software_version": ["default_sw_version"],
2431
+ "spec.software_settings.waf_signatures.automatic": ["manual"],
2432
+ "spec.software_settings.waf_signatures.manual": ["automatic"],
2320
2433
  "spec.upgrade_settings.kubernetes_upgrade_drain.disable_upgrade_drain": ["enable_upgrade_drain"],
2321
2434
  "spec.upgrade_settings.kubernetes_upgrade_drain.enable_upgrade_drain": ["disable_upgrade_drain"],
2322
2435
  "spec.upgrade_settings.kubernetes_upgrade_drain.enable_upgrade_drain.disable_vega_upgrade_mode": [
2323
2436
  "enable_vega_upgrade_mode",
2324
2437
  ],
2438
+ "spec.upgrade_settings.kubernetes_upgrade_drain.enable_upgrade_drain.drain_max_unavailable_node_count": [
2439
+ "drain_max_unavailable_node_percentage",
2440
+ ],
2441
+ "spec.upgrade_settings.kubernetes_upgrade_drain.enable_upgrade_drain.drain_max_unavailable_node_percentage": [
2442
+ "drain_max_unavailable_node_count",
2443
+ ],
2325
2444
  "spec.upgrade_settings.kubernetes_upgrade_drain.enable_upgrade_drain.enable_vega_upgrade_mode": [
2326
2445
  "disable_vega_upgrade_mode",
2327
2446
  ],
@@ -2329,6 +2448,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2329
2448
  "aws",
2330
2449
  "azure",
2331
2450
  "baremetal",
2451
+ "eks_k8s",
2332
2452
  "equinix",
2333
2453
  "gcp",
2334
2454
  "kvm",
@@ -2355,6 +2475,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2355
2475
  "spec.port_matcher": null,
2356
2476
  },
2357
2477
  minimumConfigFields: [
2478
+ "spec.action",
2358
2479
  "spec.api_group_matcher.match",
2359
2480
  "spec.asn_list.as_numbers",
2360
2481
  "spec.asn_matcher.asn_sets",
@@ -2364,6 +2485,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2364
2485
  "spec.port_matcher.ports",
2365
2486
  "spec.segment_policy.dst_segments.segments",
2366
2487
  "spec.segment_policy.src_segments.segments",
2488
+ "spec.waf_action",
2367
2489
  ],
2368
2490
  fieldConflicts: {
2369
2491
  "spec.any_asn": ["asn_list", "asn_matcher"],
@@ -2425,6 +2547,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2425
2547
  "spec.port_matcher": null,
2426
2548
  },
2427
2549
  minimumConfigFields: [
2550
+ "spec.action",
2428
2551
  "spec.api_group_matcher.match",
2429
2552
  "spec.asn_list.as_numbers",
2430
2553
  "spec.asn_matcher.asn_sets",
@@ -2434,6 +2557,7 @@ export const DEFAULTS_METADATA: Record<string, KindDefaultsMetadata> = {
2434
2557
  "spec.port_matcher.ports",
2435
2558
  "spec.segment_policy.dst_segments.segments",
2436
2559
  "spec.segment_policy.src_segments.segments",
2560
+ "spec.waf_action",
2437
2561
  ],
2438
2562
  fieldConflicts: {
2439
2563
  "spec.any_asn": ["asn_list", "asn_matcher"],
package/src/index.ts CHANGED
@@ -9,6 +9,7 @@ export type { ExportedManifest, ManifestOutputFormat, MinimalExportFilter } from
9
9
  export { applyMinimalExportFilter, formatManifestOutput, toManifest, toManifestList } from "./manifest-export";
10
10
  export { ManifestParseError, parseManifests } from "./manifest-parser";
11
11
  export { formatValidationErrors, validateManifest, validateManifests } from "./manifest-validator";
12
+ export * from "./map-constraints";
12
13
  export type { RunResourceOperationOptions } from "./operation-runner";
13
14
  export { formatResourceOperationReport, readManifestInputs, runResourceOperation } from "./operation-runner";
14
15
  export {
@@ -72,6 +72,10 @@ export function validateManifest(
72
72
  }
73
73
  }
74
74
 
75
+ if (resolved?.validateFields && options.operation !== "identity") {
76
+ errors.push(...resolved.validateFields(manifest.rawObject, options.operation === "update" ? "update" : "create"));
77
+ }
78
+
75
79
  return { result: { valid: errors.length === 0, errors, warnings }, resolved };
76
80
  }
77
81
 
@@ -0,0 +1,100 @@
1
+ /** Structured map contract rendering and local extension validation. */
2
+ import { isIP } from "node:net";
3
+
4
+ export interface MapScope {
5
+ type?: string;
6
+ minLength?: number;
7
+ maxLength?: number;
8
+ pattern?: string;
9
+ format?: string;
10
+ minimum?: number;
11
+ maximum?: number;
12
+ ranges?: number[][];
13
+ }
14
+
15
+ export interface MapConstraints {
16
+ constraintType: string;
17
+ keys?: MapScope;
18
+ values?: MapScope;
19
+ cardinality?: { minProperties?: number; maxProperties?: number };
20
+ crossEntry?: { uniqueValues?: boolean };
21
+ originalRules?: Record<string, unknown>;
22
+ }
23
+
24
+ export function formatMapConstraints(constraints: MapConstraints): string {
25
+ const parts: string[] = [];
26
+ for (const scope of ["keys", "values", "cardinality", "crossEntry"] as const) {
27
+ for (const [key, value] of Object.entries(constraints[scope] ?? {})) {
28
+ parts.push(`${scope}.${key}: ${typeof value === "string" ? value : JSON.stringify(value)}`);
29
+ }
30
+ }
31
+ return parts.join(", ");
32
+ }
33
+
34
+ function validateText(value: unknown, scope: MapScope, label: string): string[] {
35
+ const errors: string[] = [];
36
+ if (typeof value !== "string") return [`${label} must be a string`];
37
+ const length = Array.from(value).length;
38
+ if (scope.minLength !== undefined && length < scope.minLength) errors.push(`${label} below minimum length`);
39
+ if (scope.maxLength !== undefined && length > scope.maxLength) errors.push(`${label} exceeds maximum length`);
40
+ if (scope.pattern && !new RegExp(scope.pattern).test(value)) errors.push(`${label} does not match pattern`);
41
+ if (scope.type === "uint32-string") {
42
+ const number = Number(value);
43
+ if (!/^\d+$/.test(value) || !Number.isSafeInteger(number) || number > 4294967295)
44
+ errors.push(`${label} must be uint32`);
45
+ if (scope.minimum !== undefined && number < scope.minimum) errors.push(`${label} below minimum`);
46
+ if (scope.maximum !== undefined && number > scope.maximum) errors.push(`${label} exceeds maximum`);
47
+ if (scope.ranges && !scope.ranges.some(([lo, hi]) => number >= lo! && number <= hi!))
48
+ errors.push(`${label} outside ranges`);
49
+ }
50
+ switch (scope.format) {
51
+ case "ipv4":
52
+ if (isIP(value) !== 4) errors.push(`${label} must be IPv4`);
53
+ break;
54
+ case "ipv6":
55
+ if (isIP(value) !== 6) errors.push(`${label} must be IPv6`);
56
+ break;
57
+ case "ip-address":
58
+ if (!isIP(value)) errors.push(`${label} must be IP`);
59
+ break;
60
+ case "mac-address":
61
+ if (!/^(?:[\da-f]{2}:){5}[\da-f]{2}$/i.test(value)) errors.push(`${label} must be MAC`);
62
+ break;
63
+ case "regex":
64
+ try {
65
+ new RegExp(value);
66
+ } catch {
67
+ errors.push(`${label} must be a valid regex`);
68
+ }
69
+ break;
70
+ case "k8s-label-value":
71
+ if (value.length > 63 || !/^(?:[A-Za-z0-9](?:[A-Za-z0-9_.-]*[A-Za-z0-9])?)?$/.test(value))
72
+ errors.push(`${label} must be a Kubernetes label value`);
73
+ break;
74
+ case "uri-reference":
75
+ if (/[^\x21-\x7e]|%(?![\da-f]{2})/i.test(value)) errors.push(`${label} must be a URI-reference`);
76
+ break;
77
+ }
78
+ return errors;
79
+ }
80
+
81
+ export function validateMapConstraints(value: unknown, constraints: MapConstraints): string[] {
82
+ if (!value || typeof value !== "object" || Array.isArray(value)) return ["Expected a map object"];
83
+ const entries = Object.entries(value);
84
+ const errors: string[] = [];
85
+ const cardinality = constraints.cardinality;
86
+ if (cardinality?.minProperties !== undefined && entries.length < cardinality.minProperties)
87
+ errors.push("Too few map pairs");
88
+ if (cardinality?.maxProperties !== undefined && entries.length > cardinality.maxProperties)
89
+ errors.push("Too many map pairs");
90
+ for (const [key, item] of entries) {
91
+ if (constraints.keys) errors.push(...validateText(key, constraints.keys, `key ${key}`));
92
+ if (constraints.values) errors.push(...validateText(item, constraints.values, `value at ${key}`));
93
+ }
94
+ if (
95
+ constraints.crossEntry?.uniqueValues &&
96
+ new Set(entries.map(([, item]) => JSON.stringify(item))).size !== entries.length
97
+ )
98
+ errors.push("Map values must be unique");
99
+ return errors;
100
+ }
package/src/types.ts CHANGED
@@ -85,9 +85,16 @@ export interface ResolvedKind {
85
85
  delete: string;
86
86
  };
87
87
  validation?: ApiSpecValidationResourceEntry;
88
+ validateFields?: (object: Record<string, unknown>, operation: "create" | "update") => ValidationError[];
88
89
  }
89
90
 
90
- export type ValidationErrorCode = "MISSING_FIELD" | "UNKNOWN_KIND" | "INVALID_TYPE" | "PARSE_ERROR" | "DUPLICATE_NAME";
91
+ export type ValidationErrorCode =
92
+ | "MISSING_FIELD"
93
+ | "UNKNOWN_KIND"
94
+ | "INVALID_TYPE"
95
+ | "PARSE_ERROR"
96
+ | "DUPLICATE_NAME"
97
+ | "INVALID_MAP";
91
98
 
92
99
  export type ValidationWarningCode = "EXTRA_FIELD" | "DEPRECATED_FIELD";
93
100