yamlr 0.1.0__tar.gz
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.
- yamlr-0.1.0/LICENSE +45 -0
- yamlr-0.1.0/PKG-INFO +218 -0
- yamlr-0.1.0/README.md +175 -0
- yamlr-0.1.0/native_core/Cargo.lock +2621 -0
- yamlr-0.1.0/native_core/Cargo.toml +76 -0
- yamlr-0.1.0/native_core/README.md +38 -0
- yamlr-0.1.0/native_core/__init__.py +1 -0
- yamlr-0.1.0/native_core/about.hbs +70 -0
- yamlr-0.1.0/native_core/about.toml +27 -0
- yamlr-0.1.0/native_core/benches/sharder_bench.rs +93 -0
- yamlr-0.1.0/native_core/catalog/cis_benchmark_mapping.json +90 -0
- yamlr-0.1.0/native_core/catalog/forensic_catalog.json +419 -0
- yamlr-0.1.0/native_core/catalog/k8s_deprecations.json +458 -0
- yamlr-0.1.0/native_core/deny.toml +30 -0
- yamlr-0.1.0/native_core/include/yamlr.h +54 -0
- yamlr-0.1.0/native_core/src/audit_catalog.rs +92 -0
- yamlr-0.1.0/native_core/src/audit_engine.rs +445 -0
- yamlr-0.1.0/native_core/src/audit_engine_tests.rs +120 -0
- yamlr-0.1.0/native_core/src/audit_registry.rs +390 -0
- yamlr-0.1.0/native_core/src/audit_registry_tests.rs +261 -0
- yamlr-0.1.0/native_core/src/auditors/gitops_auditor.rs +172 -0
- yamlr-0.1.0/native_core/src/auditors/mod.rs +2 -0
- yamlr-0.1.0/native_core/src/bin/inspect_shards.rs +23 -0
- yamlr-0.1.0/native_core/src/bin/inspect_tree.rs +44 -0
- yamlr-0.1.0/native_core/src/bin/main.rs +29 -0
- yamlr-0.1.0/native_core/src/cache/mod.rs +257 -0
- yamlr-0.1.0/native_core/src/cel/evaluator.rs +381 -0
- yamlr-0.1.0/native_core/src/cel/k8s_validator.rs +299 -0
- yamlr-0.1.0/native_core/src/cel/mod.rs +12 -0
- yamlr-0.1.0/native_core/src/cli/admin_cmd.rs +130 -0
- yamlr-0.1.0/native_core/src/cli/audit_cmd.rs +502 -0
- yamlr-0.1.0/native_core/src/cli/baseline_cmd.rs +304 -0
- yamlr-0.1.0/native_core/src/cli/check_cmd.rs +322 -0
- yamlr-0.1.0/native_core/src/cli/completion_cmd.rs +146 -0
- yamlr-0.1.0/native_core/src/cli/demo_cmd.rs +68 -0
- yamlr-0.1.0/native_core/src/cli/diff_viewer.rs +433 -0
- yamlr-0.1.0/native_core/src/cli/dispatch.rs +445 -0
- yamlr-0.1.0/native_core/src/cli/dna_cmd.rs +205 -0
- yamlr-0.1.0/native_core/src/cli/doctor_cmd.rs +163 -0
- yamlr-0.1.0/native_core/src/cli/evidence_cmd.rs +187 -0
- yamlr-0.1.0/native_core/src/cli/explain_cmd.rs +140 -0
- yamlr-0.1.0/native_core/src/cli/features_cmd.rs +201 -0
- yamlr-0.1.0/native_core/src/cli/fleet_cmd.rs +436 -0
- yamlr-0.1.0/native_core/src/cli/fmt_cmd.rs +419 -0
- yamlr-0.1.0/native_core/src/cli/graph_cmd.rs +161 -0
- yamlr-0.1.0/native_core/src/cli/guide_cmd.rs +132 -0
- yamlr-0.1.0/native_core/src/cli/heal_adapters.rs +305 -0
- yamlr-0.1.0/native_core/src/cli/heal_args.rs +89 -0
- yamlr-0.1.0/native_core/src/cli/heal_cmd.rs +518 -0
- yamlr-0.1.0/native_core/src/cli/heal_cmd_tests.rs +414 -0
- yamlr-0.1.0/native_core/src/cli/heal_document.rs +203 -0
- yamlr-0.1.0/native_core/src/cli/heal_gates.rs +400 -0
- yamlr-0.1.0/native_core/src/cli/heal_reporting.rs +54 -0
- yamlr-0.1.0/native_core/src/cli/heal_topology.rs +75 -0
- yamlr-0.1.0/native_core/src/cli/heal_writer.rs +347 -0
- yamlr-0.1.0/native_core/src/cli/idp_export_cmd.rs +267 -0
- yamlr-0.1.0/native_core/src/cli/init_cmd.rs +149 -0
- yamlr-0.1.0/native_core/src/cli/lsp_handlers.rs +175 -0
- yamlr-0.1.0/native_core/src/cli/lsp_server.rs +343 -0
- yamlr-0.1.0/native_core/src/cli/lsp_server_tests.rs +123 -0
- yamlr-0.1.0/native_core/src/cli/mcp_server.rs +234 -0
- yamlr-0.1.0/native_core/src/cli/metrics_cmd.rs +149 -0
- yamlr-0.1.0/native_core/src/cli/migrate_cmd.rs +465 -0
- yamlr-0.1.0/native_core/src/cli/migrate_cmd_tests.rs +119 -0
- yamlr-0.1.0/native_core/src/cli/mod.rs +244 -0
- yamlr-0.1.0/native_core/src/cli/rollback_cmd.rs +91 -0
- yamlr-0.1.0/native_core/src/cli/scan_args.rs +149 -0
- yamlr-0.1.0/native_core/src/cli/scan_cmd.rs +508 -0
- yamlr-0.1.0/native_core/src/cli/scan_cmd_e2e_tests.rs +314 -0
- yamlr-0.1.0/native_core/src/cli/scan_cmd_tests.rs +282 -0
- yamlr-0.1.0/native_core/src/cli/scan_crd.rs +317 -0
- yamlr-0.1.0/native_core/src/cli/scan_fail_on.rs +84 -0
- yamlr-0.1.0/native_core/src/cli/scan_file.rs +442 -0
- yamlr-0.1.0/native_core/src/cli/scan_input.rs +119 -0
- yamlr-0.1.0/native_core/src/cli/scan_manifest.rs +429 -0
- yamlr-0.1.0/native_core/src/cli/scan_oci.rs +131 -0
- yamlr-0.1.0/native_core/src/cli/scan_output.rs +193 -0
- yamlr-0.1.0/native_core/src/cli/scan_record.rs +11 -0
- yamlr-0.1.0/native_core/src/cli/scan_render.rs +158 -0
- yamlr-0.1.0/native_core/src/cli/scan_stdin.rs +130 -0
- yamlr-0.1.0/native_core/src/cli/scan_telemetry.rs +122 -0
- yamlr-0.1.0/native_core/src/cli/scan_walk.rs +160 -0
- yamlr-0.1.0/native_core/src/cli/schema_cmd.rs +340 -0
- yamlr-0.1.0/native_core/src/cli/schema_gate.rs +532 -0
- yamlr-0.1.0/native_core/src/cli/schema_gate_tests.rs +330 -0
- yamlr-0.1.0/native_core/src/cli/secure_cmd.rs +252 -0
- yamlr-0.1.0/native_core/src/cli/sign_cmd.rs +206 -0
- yamlr-0.1.0/native_core/src/cli/status_cmd.rs +81 -0
- yamlr-0.1.0/native_core/src/cli/subscription_cmd.rs +180 -0
- yamlr-0.1.0/native_core/src/cli/support_contract.rs +348 -0
- yamlr-0.1.0/native_core/src/cli/utility_cmds.rs +251 -0
- yamlr-0.1.0/native_core/src/cli/vap_cmd.rs +391 -0
- yamlr-0.1.0/native_core/src/cli/watch.rs +270 -0
- yamlr-0.1.0/native_core/src/cli/webhook_cmd.rs +376 -0
- yamlr-0.1.0/native_core/src/cluster/mod.rs +120 -0
- yamlr-0.1.0/native_core/src/cluster/tls_config.rs +217 -0
- yamlr-0.1.0/native_core/src/cluster/webhook.rs +479 -0
- yamlr-0.1.0/native_core/src/discovery/analyzers.rs +252 -0
- yamlr-0.1.0/native_core/src/discovery/blast_radius.rs +156 -0
- yamlr-0.1.0/native_core/src/discovery/builder.rs +427 -0
- yamlr-0.1.0/native_core/src/discovery/mod.rs +21 -0
- yamlr-0.1.0/native_core/src/discovery/scanner.rs +170 -0
- yamlr-0.1.0/native_core/src/discovery/tests.rs +326 -0
- yamlr-0.1.0/native_core/src/ffi.rs +186 -0
- yamlr-0.1.0/native_core/src/grpc/mod.rs +14 -0
- yamlr-0.1.0/native_core/src/grpc/server.rs +218 -0
- yamlr-0.1.0/native_core/src/grpc/service.rs +356 -0
- yamlr-0.1.0/native_core/src/healers/anchor_declaration_healer.rs +131 -0
- yamlr-0.1.0/native_core/src/healers/annotation_contract_healer.rs +378 -0
- yamlr-0.1.0/native_core/src/healers/api_deprecation_healer.rs +433 -0
- yamlr-0.1.0/native_core/src/healers/api_deprecation_healer_tests.rs +192 -0
- yamlr-0.1.0/native_core/src/healers/api_infer_healer.rs +327 -0
- yamlr-0.1.0/native_core/src/healers/app_protocol_healer.rs +340 -0
- yamlr-0.1.0/native_core/src/healers/autoscaler_arbitration_healer.rs +262 -0
- yamlr-0.1.0/native_core/src/healers/autoscaler_arbitration_healer_tests.rs +258 -0
- yamlr-0.1.0/native_core/src/healers/block_scalar_healer.rs +211 -0
- yamlr-0.1.0/native_core/src/healers/cert_manager_healer.rs +248 -0
- yamlr-0.1.0/native_core/src/healers/cis_security_healer.rs +369 -0
- yamlr-0.1.0/native_core/src/healers/cluster_dump_healer.rs +232 -0
- yamlr-0.1.0/native_core/src/healers/configmap_healer.rs +254 -0
- yamlr-0.1.0/native_core/src/healers/configmap_secret_healer.rs +98 -0
- yamlr-0.1.0/native_core/src/healers/crb_subject_healer.rs +315 -0
- yamlr-0.1.0/native_core/src/healers/crd_healer.rs +386 -0
- yamlr-0.1.0/native_core/src/healers/cronjob_schedule_healer.rs +144 -0
- yamlr-0.1.0/native_core/src/healers/crossplane_healer.rs +226 -0
- yamlr-0.1.0/native_core/src/healers/daemonset_update_healer.rs +194 -0
- yamlr-0.1.0/native_core/src/healers/dangling_key_healer.rs +141 -0
- yamlr-0.1.0/native_core/src/healers/data_key_healer.rs +455 -0
- yamlr-0.1.0/native_core/src/healers/deployment_revision_healer.rs +155 -0
- yamlr-0.1.0/native_core/src/healers/dna_healer.rs +257 -0
- yamlr-0.1.0/native_core/src/healers/dns_network_healer.rs +288 -0
- yamlr-0.1.0/native_core/src/healers/downward_api_healer.rs +253 -0
- yamlr-0.1.0/native_core/src/healers/dra_healer.rs +182 -0
- yamlr-0.1.0/native_core/src/healers/dual_stack_healer.rs +411 -0
- yamlr-0.1.0/native_core/src/healers/encoding_transcoder_healer.rs +107 -0
- yamlr-0.1.0/native_core/src/healers/enum_healer.rs +323 -0
- yamlr-0.1.0/native_core/src/healers/ephemeral_container_healer.rs +270 -0
- yamlr-0.1.0/native_core/src/healers/external_secret_healer.rs +227 -0
- yamlr-0.1.0/native_core/src/healers/federation_healer.rs +232 -0
- yamlr-0.1.0/native_core/src/healers/gateway_api_healer.rs +338 -0
- yamlr-0.1.0/native_core/src/healers/gateway_route_healer.rs +384 -0
- yamlr-0.1.0/native_core/src/healers/gateway_tls_healer.rs +339 -0
- yamlr-0.1.0/native_core/src/healers/gitops_healer.rs +498 -0
- yamlr-0.1.0/native_core/src/healers/graceful_rollout_healer.rs +238 -0
- yamlr-0.1.0/native_core/src/healers/hpa_migration_companion.rs +323 -0
- yamlr-0.1.0/native_core/src/healers/hpa_target_healer.rs +346 -0
- yamlr-0.1.0/native_core/src/healers/image_pull_healer.rs +160 -0
- yamlr-0.1.0/native_core/src/healers/indentation_disambiguator.rs +166 -0
- yamlr-0.1.0/native_core/src/healers/ingress_annotation_healer.rs +401 -0
- yamlr-0.1.0/native_core/src/healers/ingress_port_healer.rs +504 -0
- yamlr-0.1.0/native_core/src/healers/ingress_shadow_healer.rs +154 -0
- yamlr-0.1.0/native_core/src/healers/ingress_shadow_healer_tests.rs +389 -0
- yamlr-0.1.0/native_core/src/healers/ingress_snippet_healer.rs +477 -0
- yamlr-0.1.0/native_core/src/healers/ingress_tls_healer.rs +210 -0
- yamlr-0.1.0/native_core/src/healers/istio_healer.rs +384 -0
- yamlr-0.1.0/native_core/src/healers/job_contract_healer.rs +401 -0
- yamlr-0.1.0/native_core/src/healers/key_sorter.rs +134 -0
- yamlr-0.1.0/native_core/src/healers/kustomize_healer.rs +186 -0
- yamlr-0.1.0/native_core/src/healers/lifecycle_healer.rs +283 -0
- yamlr-0.1.0/native_core/src/healers/linkerd_healer.rs +251 -0
- yamlr-0.1.0/native_core/src/healers/match_expressions_healer.rs +188 -0
- yamlr-0.1.0/native_core/src/healers/memory_unit_healer.rs +163 -0
- yamlr-0.1.0/native_core/src/healers/mod.rs +103 -0
- yamlr-0.1.0/native_core/src/healers/network_policy_egress_healer.rs +367 -0
- yamlr-0.1.0/native_core/src/healers/network_policy_healer.rs +113 -0
- yamlr-0.1.0/native_core/src/healers/node_selector_healer.rs +196 -0
- yamlr-0.1.0/native_core/src/healers/numeric_type_healer.rs +191 -0
- yamlr-0.1.0/native_core/src/healers/orphaned_indent_healer.rs +204 -0
- yamlr-0.1.0/native_core/src/healers/pdb_healer.rs +425 -0
- yamlr-0.1.0/native_core/src/healers/pdb_max_unavailable_healer.rs +131 -0
- yamlr-0.1.0/native_core/src/healers/pipeline_healer.rs +315 -0
- yamlr-0.1.0/native_core/src/healers/port_healer.rs +397 -0
- yamlr-0.1.0/native_core/src/healers/probe_healer.rs +412 -0
- yamlr-0.1.0/native_core/src/healers/probe_healer_tests.rs +167 -0
- yamlr-0.1.0/native_core/src/healers/protocol_contract_healer.rs +263 -0
- yamlr-0.1.0/native_core/src/healers/protocol_contract_healer_tests.rs +247 -0
- yamlr-0.1.0/native_core/src/healers/pvc_healer.rs +323 -0
- yamlr-0.1.0/native_core/src/healers/qos_healer.rs +290 -0
- yamlr-0.1.0/native_core/src/healers/qos_healer_tests.rs +210 -0
- yamlr-0.1.0/native_core/src/healers/rb_subject_healer.rs +246 -0
- yamlr-0.1.0/native_core/src/healers/rbac_healer.rs +404 -0
- yamlr-0.1.0/native_core/src/healers/reference_utils.rs +249 -0
- yamlr-0.1.0/native_core/src/healers/referential_healer.rs +404 -0
- yamlr-0.1.0/native_core/src/healers/referential_healer_tests.rs +200 -0
- yamlr-0.1.0/native_core/src/healers/resource_sanitizer.rs +433 -0
- yamlr-0.1.0/native_core/src/healers/secret_healer.rs +377 -0
- yamlr-0.1.0/native_core/src/healers/secret_healer_tests.rs +236 -0
- yamlr-0.1.0/native_core/src/healers/secret_store_healer.rs +291 -0
- yamlr-0.1.0/native_core/src/healers/security_context_healer.rs +345 -0
- yamlr-0.1.0/native_core/src/healers/security_context_healer_tests.rs +223 -0
- yamlr-0.1.0/native_core/src/healers/selector_healer.rs +504 -0
- yamlr-0.1.0/native_core/src/healers/sequence_indent_healer.rs +162 -0
- yamlr-0.1.0/native_core/src/healers/service_account_healer.rs +160 -0
- yamlr-0.1.0/native_core/src/healers/service_dns_healer.rs +379 -0
- yamlr-0.1.0/native_core/src/healers/service_network_contract_healer.rs +269 -0
- yamlr-0.1.0/native_core/src/healers/service_target_port_healer.rs +282 -0
- yamlr-0.1.0/native_core/src/healers/session_affinity_healer.rs +280 -0
- yamlr-0.1.0/native_core/src/healers/sidecar_healer.rs +317 -0
- yamlr-0.1.0/native_core/src/healers/statefulset_immutability_healer.rs +446 -0
- yamlr-0.1.0/native_core/src/healers/storage_emptydir_healer.rs +258 -0
- yamlr-0.1.0/native_core/src/healers/storage_ops_healer.rs +432 -0
- yamlr-0.1.0/native_core/src/healers/structural_healer.rs +432 -0
- yamlr-0.1.0/native_core/src/healers/structural_healer_tests.rs +135 -0
- yamlr-0.1.0/native_core/src/healers/stub_healer.rs +162 -0
- yamlr-0.1.0/native_core/src/healers/template_masker.rs +274 -0
- yamlr-0.1.0/native_core/src/healers/topology_key_healer.rs +264 -0
- yamlr-0.1.0/native_core/src/healers/topology_spread_healer.rs +327 -0
- yamlr-0.1.0/native_core/src/healers/topology_spread_healer_tests.rs +249 -0
- yamlr-0.1.0/native_core/src/healers/typo_dictionaries.rs +294 -0
- yamlr-0.1.0/native_core/src/healers/typo_healer.rs +382 -0
- yamlr-0.1.0/native_core/src/healers/typo_healer_tests.rs +435 -0
- yamlr-0.1.0/native_core/src/healers/velero_healer.rs +249 -0
- yamlr-0.1.0/native_core/src/healers/violation_remediator.rs +307 -0
- yamlr-0.1.0/native_core/src/healers/volume_contract_healer.rs +209 -0
- yamlr-0.1.0/native_core/src/healing.rs +94 -0
- yamlr-0.1.0/native_core/src/healing_cross_resource.rs +324 -0
- yamlr-0.1.0/native_core/src/healing_in_manifest.rs +399 -0
- yamlr-0.1.0/native_core/src/healing_tests.rs +264 -0
- yamlr-0.1.0/native_core/src/identity/extractors/annotations.rs +56 -0
- yamlr-0.1.0/native_core/src/identity/extractors/cluster_role_bindings.rs +198 -0
- yamlr-0.1.0/native_core/src/identity/extractors/configmap_refs.rs +71 -0
- yamlr-0.1.0/native_core/src/identity/extractors/container_env.rs +107 -0
- yamlr-0.1.0/native_core/src/identity/extractors/container_images.rs +51 -0
- yamlr-0.1.0/native_core/src/identity/extractors/container_ports.rs +110 -0
- yamlr-0.1.0/native_core/src/identity/extractors/daemonset_selectors.rs +55 -0
- yamlr-0.1.0/native_core/src/identity/extractors/data_keys.rs +91 -0
- yamlr-0.1.0/native_core/src/identity/extractors/deployment_selectors.rs +64 -0
- yamlr-0.1.0/native_core/src/identity/extractors/ingress_backends.rs +73 -0
- yamlr-0.1.0/native_core/src/identity/extractors/ingress_tls.rs +69 -0
- yamlr-0.1.0/native_core/src/identity/extractors/job_selectors.rs +86 -0
- yamlr-0.1.0/native_core/src/identity/extractors/mod.rs +150 -0
- yamlr-0.1.0/native_core/src/identity/extractors/namespaces.rs +103 -0
- yamlr-0.1.0/native_core/src/identity/extractors/owner_refs.rs +101 -0
- yamlr-0.1.0/native_core/src/identity/extractors/pod_security.rs +71 -0
- yamlr-0.1.0/native_core/src/identity/extractors/pvc_refs.rs +89 -0
- yamlr-0.1.0/native_core/src/identity/extractors/role_bindings.rs +206 -0
- yamlr-0.1.0/native_core/src/identity/extractors/secret_refs.rs +83 -0
- yamlr-0.1.0/native_core/src/identity/extractors/service_accounts.rs +68 -0
- yamlr-0.1.0/native_core/src/identity/extractors/service_ports.rs +134 -0
- yamlr-0.1.0/native_core/src/identity/extractors/service_selectors.rs +71 -0
- yamlr-0.1.0/native_core/src/identity/extractors/statefulset_selectors.rs +100 -0
- yamlr-0.1.0/native_core/src/identity/extractors/vpa_targets.rs +82 -0
- yamlr-0.1.0/native_core/src/identity.rs +355 -0
- yamlr-0.1.0/native_core/src/lib.rs +462 -0
- yamlr-0.1.0/native_core/src/lib_wrappers.rs +270 -0
- yamlr-0.1.0/native_core/src/models.rs +421 -0
- yamlr-0.1.0/native_core/src/models_reports.rs +351 -0
- yamlr-0.1.0/native_core/src/otel_exporter.rs +92 -0
- yamlr-0.1.0/native_core/src/parsers/anchor_resolver.rs +231 -0
- yamlr-0.1.0/native_core/src/parsers/helm/expander.rs +499 -0
- yamlr-0.1.0/native_core/src/parsers/helm/oci.rs +415 -0
- yamlr-0.1.0/native_core/src/parsers/helm/rules.rs +122 -0
- yamlr-0.1.0/native_core/src/parsers/helm/schema_validator.rs +248 -0
- yamlr-0.1.0/native_core/src/parsers/helm/sprig.rs +272 -0
- yamlr-0.1.0/native_core/src/parsers/helm/tests.rs +179 -0
- yamlr-0.1.0/native_core/src/parsers/helm/umbrella.rs +132 -0
- yamlr-0.1.0/native_core/src/parsers/helm/values.rs +384 -0
- yamlr-0.1.0/native_core/src/parsers/helm.rs +46 -0
- yamlr-0.1.0/native_core/src/parsers/heuristics/block_scalar_indentation.rs +97 -0
- yamlr-0.1.0/native_core/src/parsers/heuristics/boolean_guard.rs +135 -0
- yamlr-0.1.0/native_core/src/parsers/heuristics/flow_sanitizer.rs +182 -0
- yamlr-0.1.0/native_core/src/parsers/heuristics/indentation.rs +104 -0
- yamlr-0.1.0/native_core/src/parsers/heuristics/keywords.rs +163 -0
- yamlr-0.1.0/native_core/src/parsers/heuristics/legacy.rs +53 -0
- yamlr-0.1.0/native_core/src/parsers/heuristics/list_indentation.rs +76 -0
- yamlr-0.1.0/native_core/src/parsers/heuristics/mod.rs +202 -0
- yamlr-0.1.0/native_core/src/parsers/heuristics/punctuation.rs +529 -0
- yamlr-0.1.0/native_core/src/parsers/heuristics/punctuation_constants.rs +110 -0
- yamlr-0.1.0/native_core/src/parsers/heuristics/punctuation_tests.rs +259 -0
- yamlr-0.1.0/native_core/src/parsers/heuristics/sequence.rs +176 -0
- yamlr-0.1.0/native_core/src/parsers/heuristics/table_continuation.rs +34 -0
- yamlr-0.1.0/native_core/src/parsers/heuristics/template_safety.rs +96 -0
- yamlr-0.1.0/native_core/src/parsers/interner.rs +303 -0
- yamlr-0.1.0/native_core/src/parsers/kustomize/directory_renderer.rs +225 -0
- yamlr-0.1.0/native_core/src/parsers/kustomize/merge_matrix.rs +305 -0
- yamlr-0.1.0/native_core/src/parsers/kustomize/merge_matrix_tests.rs +224 -0
- yamlr-0.1.0/native_core/src/parsers/kustomize/mod.rs +16 -0
- yamlr-0.1.0/native_core/src/parsers/kustomize/renderer.rs +390 -0
- yamlr-0.1.0/native_core/src/parsers/layout_grafter.rs +476 -0
- yamlr-0.1.0/native_core/src/parsers/mod.rs +29 -0
- yamlr-0.1.0/native_core/src/parsers/reconstructor.rs +340 -0
- yamlr-0.1.0/native_core/src/parsers/shard_finder.rs +96 -0
- yamlr-0.1.0/native_core/src/parsers/streaming.rs +260 -0
- yamlr-0.1.0/native_core/src/parsers/terraform.rs +20 -0
- yamlr-0.1.0/native_core/src/path_utils.rs +139 -0
- yamlr-0.1.0/native_core/src/pipeline.rs +284 -0
- yamlr-0.1.0/native_core/src/rego/compiler.rs +427 -0
- yamlr-0.1.0/native_core/src/rego/mod.rs +2 -0
- yamlr-0.1.0/native_core/src/remediation_io/gitops.rs +178 -0
- yamlr-0.1.0/native_core/src/remediation_io/journal.rs +365 -0
- yamlr-0.1.0/native_core/src/remediation_io/policy_adapter.rs +284 -0
- yamlr-0.1.0/native_core/src/remediation_io/rollback.rs +153 -0
- yamlr-0.1.0/native_core/src/remediation_io/tests.rs +232 -0
- yamlr-0.1.0/native_core/src/remediation_io/vault.rs +192 -0
- yamlr-0.1.0/native_core/src/remediation_io.rs +17 -0
- yamlr-0.1.0/native_core/src/sarif/code_flows.rs +281 -0
- yamlr-0.1.0/native_core/src/sarif/mod.rs +8 -0
- yamlr-0.1.0/native_core/src/schemas/bundler.rs +418 -0
- yamlr-0.1.0/native_core/src/schemas/cncf_crds_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/constraints.rs +496 -0
- yamlr-0.1.0/native_core/src/schemas/crd_validator.rs +432 -0
- yamlr-0.1.0/native_core/src/schemas/distiller.rs +399 -0
- yamlr-0.1.0/native_core/src/schemas/fetcher.rs +363 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.21_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.22_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.23_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.24_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.25_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.26_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.27_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.28_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.29_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.30_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.31_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.32_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.33_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.34_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.35_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.36_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/k8s_v1.37_distilled.json.zst +0 -0
- yamlr-0.1.0/native_core/src/schemas/nested.rs +508 -0
- yamlr-0.1.0/native_core/src/schemas/tests.rs +388 -0
- yamlr-0.1.0/native_core/src/schemas/unknown_fields.rs +323 -0
- yamlr-0.1.0/native_core/src/schemas/validator.rs +451 -0
- yamlr-0.1.0/native_core/src/schemas.rs +45 -0
- yamlr-0.1.0/native_core/src/security/attestation.rs +422 -0
- yamlr-0.1.0/native_core/src/security/entitlements.rs +352 -0
- yamlr-0.1.0/native_core/src/security/entitlements_tests.rs +268 -0
- yamlr-0.1.0/native_core/src/security/hardening.rs +498 -0
- yamlr-0.1.0/native_core/src/security/licensing.rs +294 -0
- yamlr-0.1.0/native_core/src/security/licensing_tests.rs +220 -0
- yamlr-0.1.0/native_core/src/security/public_key.pem +9 -0
- yamlr-0.1.0/native_core/src/security/signature.rs +217 -0
- yamlr-0.1.0/native_core/src/security/suppression.rs +148 -0
- yamlr-0.1.0/native_core/src/security/team_refresh.rs +297 -0
- yamlr-0.1.0/native_core/src/security/tests.rs +225 -0
- yamlr-0.1.0/native_core/src/security.rs +24 -0
- yamlr-0.1.0/native_core/src/sharder.rs +507 -0
- yamlr-0.1.0/native_core/src/sharder_guardrails.rs +100 -0
- yamlr-0.1.0/native_core/src/sharder_keys.rs +119 -0
- yamlr-0.1.0/native_core/src/sharder_scanner.rs +119 -0
- yamlr-0.1.0/native_core/src/sharder_tests.rs +205 -0
- yamlr-0.1.0/native_core/src/shield.rs +296 -0
- yamlr-0.1.0/native_core/src/structurer.rs +411 -0
- yamlr-0.1.0/native_core/src/telemetry.rs +111 -0
- yamlr-0.1.0/native_core/src/telemetry_gate.rs +72 -0
- yamlr-0.1.0/native_core/src/wasm.rs +247 -0
- yamlr-0.1.0/native_core/tests/adversarial_sre_invariants.rs +195 -0
- yamlr-0.1.0/native_core/tests/crash_consistency_test.rs +182 -0
- yamlr-0.1.0/native_core/tests/fixtures/licensing_test_private.pem +28 -0
- yamlr-0.1.0/native_core/tests/fixtures/licensing_test_public.pem +9 -0
- yamlr-0.1.0/native_core/tests/golden_bundle_e2e.rs +77 -0
- yamlr-0.1.0/native_core/tests/golden_corpus_invariants.rs +340 -0
- yamlr-0.1.0/native_core/tests/human_error_healers_e2e.rs +102 -0
- yamlr-0.1.0/native_core/tests/k8s_conformance_oracle.rs +195 -0
- yamlr-0.1.0/native_core/tests/k8s_version_contract_test.rs +89 -0
- yamlr-0.1.0/native_core/tests/nightmare_healers_e2e.rs +209 -0
- yamlr-0.1.0/native_core/tests/regression_data_loss_fixes.rs +825 -0
- yamlr-0.1.0/native_core/tests/rule_uniqueness_test.rs +233 -0
- yamlr-0.1.0/native_core/tests/schema_gate_fault_injection_tests.rs +176 -0
- yamlr-0.1.0/native_core/tests/traps_35_to_46_e2e.rs +509 -0
- yamlr-0.1.0/native_core/tests/unbreakable_hardening_e2e.rs +335 -0
- yamlr-0.1.0/pyproject.toml +83 -0
- yamlr-0.1.0/src/yamlr/__init__.py +120 -0
- yamlr-0.1.0/src/yamlr/__main__.py +77 -0
- yamlr-0.1.0/src/yamlr/_find_bin.py +76 -0
- yamlr-0.1.0/src/yamlr/version.py +10 -0
- yamlr-0.1.0/src/yamlr_native/__init__.py +7 -0
- yamlr-0.1.0/src/yamlr_native/__init__.pyi +71 -0
yamlr-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
YAMLR PROPRIETARY & COMMERCIAL SOFTWARE LICENSE
|
|
2
|
+
(All Rights Reserved)
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2026 Timonel Labs. All Rights Reserved.
|
|
5
|
+
|
|
6
|
+
IMPORTANT: PLEASE READ THIS SOFTWARE LICENSE AGREEMENT CAREFULLY BEFORE DOWNLOADING,
|
|
7
|
+
INSTALLING, COPYING, OR USING THIS SOFTWARE.
|
|
8
|
+
|
|
9
|
+
1. PROPRIETARY RIGHTS AND OWNERSHIP
|
|
10
|
+
This software ("Yamlr"), including its source code, object code, documentation,
|
|
11
|
+
architecture, data models, algorithms, and interface designs, is the proprietary
|
|
12
|
+
and confidential intellectual property of Timonel Labs ("Licensor").
|
|
13
|
+
Yamlr is protected by international copyright laws and applicable trade secret laws.
|
|
14
|
+
|
|
15
|
+
2. GRANT OF LICENSE
|
|
16
|
+
Subject to the terms of this Agreement:
|
|
17
|
+
a) Evaluation / Community Use: You are granted a limited, personal, non-exclusive,
|
|
18
|
+
non-transferable, revocable license to install and execute the community tier of
|
|
19
|
+
Yamlr solely for internal evaluation and non-commercial development purposes.
|
|
20
|
+
b) Commercial / Enterprise Use: Any production deployment, automated CI/CD pipeline
|
|
21
|
+
execution across multi-node or enterprise infrastructure, or commercial use
|
|
22
|
+
requires a valid, active commercial license issued by the Licensor.
|
|
23
|
+
|
|
24
|
+
3. RESTRICTIONS
|
|
25
|
+
You may NOT:
|
|
26
|
+
a) Decompile, reverse engineer, disassemble, or attempt to derive the underlying
|
|
27
|
+
source code of compiled native components or cryptographic services.
|
|
28
|
+
b) Sub-license, lease, rent, sell, distribute, or host Yamlr as a managed service
|
|
29
|
+
or SaaS offering without prior written authorization from the Licensor.
|
|
30
|
+
c) Remove, alter, or obscure any proprietary notices, copyright marks, or license
|
|
31
|
+
identifiers contained within Yamlr or its documentation.
|
|
32
|
+
d) Bypass, disable, or circumvent any license validation or cryptographic verification
|
|
33
|
+
mechanisms.
|
|
34
|
+
|
|
35
|
+
4. DISCLAIMER OF WARRANTIES
|
|
36
|
+
YAMLR IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
37
|
+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
38
|
+
PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE LICENSOR BE LIABLE
|
|
39
|
+
FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT,
|
|
40
|
+
OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE.
|
|
41
|
+
|
|
42
|
+
5. TERMINATION
|
|
43
|
+
This license is effective until terminated. Your rights under this license will
|
|
44
|
+
terminate automatically without notice from the Licensor if you fail to comply with
|
|
45
|
+
any term(s) of this Agreement.
|
yamlr-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: yamlr
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Programming Language :: Python :: 3
|
|
5
|
+
Classifier: License :: Other/Proprietary License
|
|
6
|
+
Classifier: Operating System :: OS Independent
|
|
7
|
+
Requires-Dist: pyinstaller>=6.4.0 ; extra == 'build'
|
|
8
|
+
Requires-Dist: pytest>=7.0 ; extra == 'dev'
|
|
9
|
+
Requires-Dist: pytest-cov>=4.0 ; extra == 'dev'
|
|
10
|
+
Requires-Dist: black>=22.0 ; extra == 'dev'
|
|
11
|
+
Requires-Dist: mypy>=1.0 ; extra == 'dev'
|
|
12
|
+
Requires-Dist: sphinx>=7.0 ; extra == 'dev'
|
|
13
|
+
Requires-Dist: sphinx-rtd-theme>=1.3 ; extra == 'dev'
|
|
14
|
+
Requires-Dist: myst-parser>=2.0 ; extra == 'dev'
|
|
15
|
+
Requires-Dist: pylint>=3.0 ; extra == 'dev'
|
|
16
|
+
Requires-Dist: ruamel-yaml>=0.17.0 ; extra == 'legacy'
|
|
17
|
+
Requires-Dist: rich>=12.0.0 ; extra == 'legacy'
|
|
18
|
+
Requires-Dist: jsonschema>=4.0.0 ; extra == 'legacy'
|
|
19
|
+
Requires-Dist: pyyaml>=6.0 ; extra == 'legacy'
|
|
20
|
+
Requires-Dist: pydantic>=2.0.0 ; extra == 'legacy'
|
|
21
|
+
Requires-Dist: portalocker>=2.0.0 ; extra == 'legacy'
|
|
22
|
+
Requires-Dist: pyjwt>=2.8.0 ; extra == 'legacy'
|
|
23
|
+
Requires-Dist: cryptography>=42.0.0 ; extra == 'legacy'
|
|
24
|
+
Requires-Dist: joblib>=1.3.0 ; extra == 'legacy'
|
|
25
|
+
Requires-Dist: keyring>=24.0.0 ; extra == 'legacy'
|
|
26
|
+
Requires-Dist: mcp>=0.9.1 ; extra == 'legacy'
|
|
27
|
+
Requires-Dist: reportlab>=4.0.0 ; extra == 'reporting'
|
|
28
|
+
Provides-Extra: build
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Provides-Extra: legacy
|
|
31
|
+
Provides-Extra: reporting
|
|
32
|
+
License-File: LICENSE
|
|
33
|
+
Summary: yamlr — Kubernetes manifest safety & healing engine (Python SDK & Automation Plane)
|
|
34
|
+
Keywords: kubernetes,yaml,devops,sre,yamlr,manifest-healing
|
|
35
|
+
Author-email: Yamlr Team <contact@yamlr.dev>
|
|
36
|
+
License: Proprietary
|
|
37
|
+
Requires-Python: >=3.10
|
|
38
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
39
|
+
Project-URL: Homepage, https://yamlr.dev
|
|
40
|
+
Project-URL: Issues, https://github.com/yamlr/yamlr/issues
|
|
41
|
+
Project-URL: Repository, https://github.com/yamlr/yamlr.git
|
|
42
|
+
|
|
43
|
+
# Yamlr: The Kubernetes Configuration Resolution Plane
|
|
44
|
+
|
|
45
|
+
> Reconcile and repair Kubernetes configurations before deployment.
|
|
46
|
+
|
|
47
|
+
[](https://github.com/yamlr/yamlr/actions)
|
|
48
|
+
[](https://get.yamlr.dev)
|
|
49
|
+
[](LICENSE)
|
|
50
|
+
|
|
51
|
+
Yamlr resolves schema deviations, cross-resource dependencies, and deprecated APIs before manifests reach the cluster. Built with a high-performance native core, it validates configurations offline against official schemas, preserves every human comment and layout detail, and delivers deterministic idempotent repairs.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Quick Install
|
|
56
|
+
|
|
57
|
+
### Homebrew (macOS & Linux)
|
|
58
|
+
```bash
|
|
59
|
+
brew install yamlr/tap/yamlr
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### One-Line Install Script
|
|
63
|
+
**Linux & macOS:**
|
|
64
|
+
```bash
|
|
65
|
+
curl -fsSL https://get.yamlr.dev/install.sh | sh
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Windows (PowerShell):**
|
|
69
|
+
```powershell
|
|
70
|
+
irm https://get.yamlr.dev/install.ps1 | iex
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Pre-Built Binaries
|
|
74
|
+
Static binaries are published with every release on [GitHub Releases](https://get.yamlr.dev):
|
|
75
|
+
- **Linux:** `x86_64` (glibc / musl), `aarch64` (ARM64)
|
|
76
|
+
- **macOS:** Apple Silicon (`aarch64`), Intel (`x86_64`)
|
|
77
|
+
- **Windows:** `x86_64` (`yamlr.exe`)
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 5-Minute Quickstart
|
|
82
|
+
|
|
83
|
+
### 1. Audit manifests against embedded Kubernetes schemas
|
|
84
|
+
```bash
|
|
85
|
+
yamlr scan ./k8s
|
|
86
|
+
```
|
|
87
|
+
*Validates offline against pre-compiled Kubernetes OpenAPI schemas (`v1.21` through `v1.37`), with forward-compatible baseline fallback and dynamic fetch for `v1.38+`.*
|
|
88
|
+
|
|
89
|
+
### 2. Preview proposed repairs in unified color diff
|
|
90
|
+
```bash
|
|
91
|
+
yamlr heal ./k8s --diff
|
|
92
|
+
```
|
|
93
|
+
*Inspect exact changes before writing anything to disk.*
|
|
94
|
+
|
|
95
|
+
### 3. Apply repairs in-place (preserves comments and formatting)
|
|
96
|
+
```bash
|
|
97
|
+
yamlr heal ./k8s --apply
|
|
98
|
+
```
|
|
99
|
+
*Fixes broken selectors, typo fields, ports, deprecated API versions, and RBAC bindings.*
|
|
100
|
+
|
|
101
|
+
### 4. Format manifests according to official Kubernetes schema hierarchy
|
|
102
|
+
```bash
|
|
103
|
+
yamlr fmt -w ./k8s
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Integrations
|
|
109
|
+
|
|
110
|
+
### Pre-Commit Hook
|
|
111
|
+
Enforce clean, self-healed manifests before every git commit:
|
|
112
|
+
|
|
113
|
+
```yaml
|
|
114
|
+
# .pre-commit-config.yaml
|
|
115
|
+
repos:
|
|
116
|
+
- repo: https://github.com/yamlr/yamlr
|
|
117
|
+
rev: v0.1.0
|
|
118
|
+
hooks:
|
|
119
|
+
# Safe read-only preview (blocks commit and displays diff if repairs needed)
|
|
120
|
+
- id: yamlr-heal
|
|
121
|
+
# To auto-repair manifests in-place instead, use yamlr-heal-apply:
|
|
122
|
+
# - id: yamlr-heal-apply
|
|
123
|
+
- id: yamlr-scan
|
|
124
|
+
args: ["--fail-on", "error"]
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### GitHub Actions CI
|
|
128
|
+
Run schema audits and upload native SARIF reports to GitHub Code Scanning:
|
|
129
|
+
|
|
130
|
+
```yaml
|
|
131
|
+
name: Manifest Gate
|
|
132
|
+
on: [push, pull_request]
|
|
133
|
+
|
|
134
|
+
jobs:
|
|
135
|
+
yamlr:
|
|
136
|
+
runs-on: ubuntu-latest
|
|
137
|
+
steps:
|
|
138
|
+
- uses: actions/checkout@v4
|
|
139
|
+
- name: Audit Manifests
|
|
140
|
+
uses: yamlr/yamlr/actions/scan@v1
|
|
141
|
+
with:
|
|
142
|
+
path: ./manifests
|
|
143
|
+
output-file: results.sarif
|
|
144
|
+
- name: Upload SARIF to GitHub Code Scanning
|
|
145
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
146
|
+
with:
|
|
147
|
+
sarif_file: results.sarif
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### VS Code Extension
|
|
151
|
+
Real-time keystroke diagnostics, schema hover tooltips, and one-click quick-fixes via the embedded Language Server:
|
|
152
|
+
1. Search for `Yamlr` in the VS Code Marketplace or install [`yamlr.vsix`](https://get.yamlr.dev).
|
|
153
|
+
2. The extension automatically invokes the native `yamlr lsp` background daemon.
|
|
154
|
+
|
|
155
|
+
### GitOps: ArgoCD & Flux
|
|
156
|
+
- **ArgoCD CMP:** Deploy `yamlr-cmp.yaml` as a ConfigManagementPlugin sidecar to heal manifests prior to sync.
|
|
157
|
+
- **Flux:** Add `yamlr` as a Kustomize post-renderer to catch and repair broken manifests in the reconciliation loop.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Empirical Fleet Proof
|
|
162
|
+
|
|
163
|
+
We test Yamlr against real-world production Kubernetes manifests across top CNCF projects. Every manifest must pass 5 strict invariant gates without exception:
|
|
164
|
+
|
|
165
|
+
1. **Zero Dropped Comments:** Runtime pre-write gate strictly enforces zero comment loss (`healed_comments >= orig_comments`).
|
|
166
|
+
2. **Kubernetes OpenAPI v3 Schema Validity:** All healed files validate against official Kubernetes OpenAPI schemas.
|
|
167
|
+
3. **Mathematical Idempotency:** Applying healing twice produces zero diff: `h(h(x)) == h(x)`.
|
|
168
|
+
4. **Headless `kubectl dry-run` Validation:** Clean pass through client dry-run verification.
|
|
169
|
+
5. **Keyword Collision Immunity:** Field names matching reserved keywords (such as `type`, `status`, `port`) are parsed with correct contextual scope.
|
|
170
|
+
|
|
171
|
+
### Fleet Validation & Invariant Testing (Category A: CNCF Ecosystem)
|
|
172
|
+
| Metric | Result |
|
|
173
|
+
| :--- | :--- |
|
|
174
|
+
| **CNCF Ecosystem Corpus Manifests** | **Evaluated across CNCF Golden Test Corpus** |
|
|
175
|
+
| **Automated Regression Suite** | **821 Automated Tests Passing (757 Unit + 64 Integration)** |
|
|
176
|
+
| **Production Architecture Traps Cataloged** | **79** |
|
|
177
|
+
| **Zero Spurious Mutations** | **100.0% Byte-for-Byte Unchanged on Fully Compliant Manifests** |
|
|
178
|
+
| **Single Document Healing Latency** | **Sub-50 ms typical (warm cache)** |
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## The 79 Production Traps Handled by Yamlr
|
|
183
|
+
|
|
184
|
+
Yamlr isolates and automatically repairs 79 structural, semantic, and cross-resource production traps, including:
|
|
185
|
+
|
|
186
|
+
- **Cross-Resource Misalignment:** Mismatched `spec.selector.matchLabels` and `spec.template.metadata.labels`, broken Service `targetPort` names, orphaned ConfigMap/Secret volume mounts.
|
|
187
|
+
- **RBAC & Security Constraints:** Missing `ServiceAccount` declarations, malformed `RoleBinding` subjects, CIS Benchmark container security context defaults.
|
|
188
|
+
- **API Version Deprecations:** Automatic migration of retired Kubernetes APIs (`extensions/v1beta1`, `networking.k8s.io/v1beta1`) to active stable equivalents.
|
|
189
|
+
- **Syntax & Schema Traps:** Unquoted YAML octal numeric strings (e.g. `0777`), tab-polluted indentation, boolean scalar truncation (`yes`/`no`/`on`/`off`), and multiline block scalar formatting (`|`, `>`).
|
|
190
|
+
- **Resource Limits & Units:** Correction of legacy or invalid memory units (e.g. `1000M` vs `1000Mi`), probe timing conflicts (`periodSeconds` < `timeoutSeconds`), and PDB availability constraints.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Model Context Protocol (MCP) Server
|
|
195
|
+
|
|
196
|
+
Yamlr includes a built-in Model Context Protocol server. AI coding agents and LLM orchestration frameworks can connect to Yamlr via standard I/O:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
yamlr mcp
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Agents use Yamlr as a deterministic, offline compiler to audit and heal generated Kubernetes infrastructure before submitting pull requests or applying manifests to clusters.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Documentation
|
|
207
|
+
|
|
208
|
+
- [CLI Reference Guide](docs/CLI_REFERENCE.md)
|
|
209
|
+
- [Configuration Documentation](docs/CONFIGURATION.md)
|
|
210
|
+
- [Architecture Model](docs/ARCHITECTURE_MODEL.md)
|
|
211
|
+
- [Positioning & Architecture Strategy](docs/Yamlr_Positioning_Strategy.md)
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## License
|
|
216
|
+
|
|
217
|
+
Yamlr is proprietary software owned by Timonel Labs. See [LICENSE](LICENSE) for commercial and evaluation terms.
|
|
218
|
+
|
yamlr-0.1.0/README.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# Yamlr: The Kubernetes Configuration Resolution Plane
|
|
2
|
+
|
|
3
|
+
> Reconcile and repair Kubernetes configurations before deployment.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/yamlr/yamlr/actions)
|
|
6
|
+
[](https://get.yamlr.dev)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
Yamlr resolves schema deviations, cross-resource dependencies, and deprecated APIs before manifests reach the cluster. Built with a high-performance native core, it validates configurations offline against official schemas, preserves every human comment and layout detail, and delivers deterministic idempotent repairs.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Quick Install
|
|
14
|
+
|
|
15
|
+
### Homebrew (macOS & Linux)
|
|
16
|
+
```bash
|
|
17
|
+
brew install yamlr/tap/yamlr
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### One-Line Install Script
|
|
21
|
+
**Linux & macOS:**
|
|
22
|
+
```bash
|
|
23
|
+
curl -fsSL https://get.yamlr.dev/install.sh | sh
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Windows (PowerShell):**
|
|
27
|
+
```powershell
|
|
28
|
+
irm https://get.yamlr.dev/install.ps1 | iex
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Pre-Built Binaries
|
|
32
|
+
Static binaries are published with every release on [GitHub Releases](https://get.yamlr.dev):
|
|
33
|
+
- **Linux:** `x86_64` (glibc / musl), `aarch64` (ARM64)
|
|
34
|
+
- **macOS:** Apple Silicon (`aarch64`), Intel (`x86_64`)
|
|
35
|
+
- **Windows:** `x86_64` (`yamlr.exe`)
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 5-Minute Quickstart
|
|
40
|
+
|
|
41
|
+
### 1. Audit manifests against embedded Kubernetes schemas
|
|
42
|
+
```bash
|
|
43
|
+
yamlr scan ./k8s
|
|
44
|
+
```
|
|
45
|
+
*Validates offline against pre-compiled Kubernetes OpenAPI schemas (`v1.21` through `v1.37`), with forward-compatible baseline fallback and dynamic fetch for `v1.38+`.*
|
|
46
|
+
|
|
47
|
+
### 2. Preview proposed repairs in unified color diff
|
|
48
|
+
```bash
|
|
49
|
+
yamlr heal ./k8s --diff
|
|
50
|
+
```
|
|
51
|
+
*Inspect exact changes before writing anything to disk.*
|
|
52
|
+
|
|
53
|
+
### 3. Apply repairs in-place (preserves comments and formatting)
|
|
54
|
+
```bash
|
|
55
|
+
yamlr heal ./k8s --apply
|
|
56
|
+
```
|
|
57
|
+
*Fixes broken selectors, typo fields, ports, deprecated API versions, and RBAC bindings.*
|
|
58
|
+
|
|
59
|
+
### 4. Format manifests according to official Kubernetes schema hierarchy
|
|
60
|
+
```bash
|
|
61
|
+
yamlr fmt -w ./k8s
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Integrations
|
|
67
|
+
|
|
68
|
+
### Pre-Commit Hook
|
|
69
|
+
Enforce clean, self-healed manifests before every git commit:
|
|
70
|
+
|
|
71
|
+
```yaml
|
|
72
|
+
# .pre-commit-config.yaml
|
|
73
|
+
repos:
|
|
74
|
+
- repo: https://github.com/yamlr/yamlr
|
|
75
|
+
rev: v0.1.0
|
|
76
|
+
hooks:
|
|
77
|
+
# Safe read-only preview (blocks commit and displays diff if repairs needed)
|
|
78
|
+
- id: yamlr-heal
|
|
79
|
+
# To auto-repair manifests in-place instead, use yamlr-heal-apply:
|
|
80
|
+
# - id: yamlr-heal-apply
|
|
81
|
+
- id: yamlr-scan
|
|
82
|
+
args: ["--fail-on", "error"]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### GitHub Actions CI
|
|
86
|
+
Run schema audits and upload native SARIF reports to GitHub Code Scanning:
|
|
87
|
+
|
|
88
|
+
```yaml
|
|
89
|
+
name: Manifest Gate
|
|
90
|
+
on: [push, pull_request]
|
|
91
|
+
|
|
92
|
+
jobs:
|
|
93
|
+
yamlr:
|
|
94
|
+
runs-on: ubuntu-latest
|
|
95
|
+
steps:
|
|
96
|
+
- uses: actions/checkout@v4
|
|
97
|
+
- name: Audit Manifests
|
|
98
|
+
uses: yamlr/yamlr/actions/scan@v1
|
|
99
|
+
with:
|
|
100
|
+
path: ./manifests
|
|
101
|
+
output-file: results.sarif
|
|
102
|
+
- name: Upload SARIF to GitHub Code Scanning
|
|
103
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
104
|
+
with:
|
|
105
|
+
sarif_file: results.sarif
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### VS Code Extension
|
|
109
|
+
Real-time keystroke diagnostics, schema hover tooltips, and one-click quick-fixes via the embedded Language Server:
|
|
110
|
+
1. Search for `Yamlr` in the VS Code Marketplace or install [`yamlr.vsix`](https://get.yamlr.dev).
|
|
111
|
+
2. The extension automatically invokes the native `yamlr lsp` background daemon.
|
|
112
|
+
|
|
113
|
+
### GitOps: ArgoCD & Flux
|
|
114
|
+
- **ArgoCD CMP:** Deploy `yamlr-cmp.yaml` as a ConfigManagementPlugin sidecar to heal manifests prior to sync.
|
|
115
|
+
- **Flux:** Add `yamlr` as a Kustomize post-renderer to catch and repair broken manifests in the reconciliation loop.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Empirical Fleet Proof
|
|
120
|
+
|
|
121
|
+
We test Yamlr against real-world production Kubernetes manifests across top CNCF projects. Every manifest must pass 5 strict invariant gates without exception:
|
|
122
|
+
|
|
123
|
+
1. **Zero Dropped Comments:** Runtime pre-write gate strictly enforces zero comment loss (`healed_comments >= orig_comments`).
|
|
124
|
+
2. **Kubernetes OpenAPI v3 Schema Validity:** All healed files validate against official Kubernetes OpenAPI schemas.
|
|
125
|
+
3. **Mathematical Idempotency:** Applying healing twice produces zero diff: `h(h(x)) == h(x)`.
|
|
126
|
+
4. **Headless `kubectl dry-run` Validation:** Clean pass through client dry-run verification.
|
|
127
|
+
5. **Keyword Collision Immunity:** Field names matching reserved keywords (such as `type`, `status`, `port`) are parsed with correct contextual scope.
|
|
128
|
+
|
|
129
|
+
### Fleet Validation & Invariant Testing (Category A: CNCF Ecosystem)
|
|
130
|
+
| Metric | Result |
|
|
131
|
+
| :--- | :--- |
|
|
132
|
+
| **CNCF Ecosystem Corpus Manifests** | **Evaluated across CNCF Golden Test Corpus** |
|
|
133
|
+
| **Automated Regression Suite** | **821 Automated Tests Passing (757 Unit + 64 Integration)** |
|
|
134
|
+
| **Production Architecture Traps Cataloged** | **79** |
|
|
135
|
+
| **Zero Spurious Mutations** | **100.0% Byte-for-Byte Unchanged on Fully Compliant Manifests** |
|
|
136
|
+
| **Single Document Healing Latency** | **Sub-50 ms typical (warm cache)** |
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## The 79 Production Traps Handled by Yamlr
|
|
141
|
+
|
|
142
|
+
Yamlr isolates and automatically repairs 79 structural, semantic, and cross-resource production traps, including:
|
|
143
|
+
|
|
144
|
+
- **Cross-Resource Misalignment:** Mismatched `spec.selector.matchLabels` and `spec.template.metadata.labels`, broken Service `targetPort` names, orphaned ConfigMap/Secret volume mounts.
|
|
145
|
+
- **RBAC & Security Constraints:** Missing `ServiceAccount` declarations, malformed `RoleBinding` subjects, CIS Benchmark container security context defaults.
|
|
146
|
+
- **API Version Deprecations:** Automatic migration of retired Kubernetes APIs (`extensions/v1beta1`, `networking.k8s.io/v1beta1`) to active stable equivalents.
|
|
147
|
+
- **Syntax & Schema Traps:** Unquoted YAML octal numeric strings (e.g. `0777`), tab-polluted indentation, boolean scalar truncation (`yes`/`no`/`on`/`off`), and multiline block scalar formatting (`|`, `>`).
|
|
148
|
+
- **Resource Limits & Units:** Correction of legacy or invalid memory units (e.g. `1000M` vs `1000Mi`), probe timing conflicts (`periodSeconds` < `timeoutSeconds`), and PDB availability constraints.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Model Context Protocol (MCP) Server
|
|
153
|
+
|
|
154
|
+
Yamlr includes a built-in Model Context Protocol server. AI coding agents and LLM orchestration frameworks can connect to Yamlr via standard I/O:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
yamlr mcp
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Agents use Yamlr as a deterministic, offline compiler to audit and heal generated Kubernetes infrastructure before submitting pull requests or applying manifests to clusters.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Documentation
|
|
165
|
+
|
|
166
|
+
- [CLI Reference Guide](docs/CLI_REFERENCE.md)
|
|
167
|
+
- [Configuration Documentation](docs/CONFIGURATION.md)
|
|
168
|
+
- [Architecture Model](docs/ARCHITECTURE_MODEL.md)
|
|
169
|
+
- [Positioning & Architecture Strategy](docs/Yamlr_Positioning_Strategy.md)
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## License
|
|
174
|
+
|
|
175
|
+
Yamlr is proprietary software owned by Timonel Labs. See [LICENSE](LICENSE) for commercial and evaluation terms.
|