when running datree in kustomize mode, failed builds will generate an empty yaml, causing an uninformative error message.
Therefore, we are trying to test the actual kustomization.yaml files for schema conformance and yaml validity.
This works on the CLI, but not on the action:
CLI:
✗ datree test infrastructure/kustomization.yaml
❌ k8s schema validation error: could not find schema for Kustomization
Are you trying to test Kustomize files? To run Datree with Kustomize, use datree kustomize test command, or check out Kustomize support docs:
https://hub.datree.io/kustomize-support
okay, so apparently the empty-file-generated failure mode is highly specific to a kustomization.yaml with a broken schema definition. This is a kustomize error and not a datree action one. closing.
Hi,
when running datree in kustomize mode, failed builds will generate an empty yaml, causing an uninformative error message.
Therefore, we are trying to test the actual kustomization.yaml files for schema conformance and yaml validity. This works on the CLI, but not on the action:
CLI: ✗ datree test infrastructure/kustomization.yaml
(Summary)
Passing YAML validation: 1/1
Passing Kubernetes (1.20.0) schema validation: 1/1
Passing policy check: 1/1
+-----------------------------------+------------------------------------------------------+ | Enabled rules in policy "Default" | 21 | | Configs tested against policy | 1 | | Total rules evaluated | 21 | | Total rules skipped | 0 | | Total rules failed | 0 | | Total rules passed | 21 | | See all rules in policy | REDACTED | +-----------------------------------+------------------------------------------------------+
action:
[V] YAML validation [X] Kubernetes schema validation
❌ k8s schema validation error: could not find schema for Kustomization
Are you trying to test Kustomize files? To run Datree with Kustomize, use
datree kustomize test
command, or check out Kustomize support docs: https://hub.datree.io/kustomize-supportTo troubleshoot: refer to our docs [https://hub.datree.io/troubleshooting#schema-validation-failure] To ignore this failure: use the CLI flag
--ignore-missing-schemas
[?] Policy check didn't run for this file
please advise