Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k8s object names are not displayed during datree kustomize test schema validation #875

Open
Mahesh-Gunda-Maersk opened this issue Feb 3, 2023 · 3 comments
Labels
enhancement New feature or request up for grabs Looking for a contributor to take this task
Projects

Comments

@Mahesh-Gunda-Maersk
Copy link

Describe the bug
is there a way we can get the K8s Object names which are reported during k8s schema validation.

To Reproduce
Steps to reproduce the behavior:

  1. using kustomize with lot of crds and yamls.
  2. datree kustomize test
    Expected behavior
    k8s object name should be printed in the error message. As we use buch of CRD files and yamls it was quite difficult to find which object has that null value for creationtimestamp

Screenshots
image

Desktop (please complete the following information):

Datree version (run datree version):
-1.8.21

Additional context
Add any other context about the problem here.
If possible, include a YAML file to reproduce the bug.

@Mahesh-Gunda-Maersk Mahesh-Gunda-Maersk added the bug Something isn't working label Feb 3, 2023
@eyarz eyarz added enhancement New feature or request and removed bug Something isn't working labels Feb 5, 2023
@eyarz
Copy link
Member

eyarz commented Feb 5, 2023

that's a good point.
which metadata do you think can help you debug schema validation errors?
will name and kind be enough?

in the meanwhile, as a workaround, you can use the --save-rendered flag.
this way, you can open the rendered manifest to understand the root cause of the schema validation error:
image

@Mahesh-Gunda-Maersk
Copy link
Author

Mahesh-Gunda-Maersk commented Feb 6, 2023

Thanks. we havily use kustomize with many crds etc. object name/kind will help us lot in identifying the incorrect object. we are not saving rendered output in our CI pipeline. at present we are doing a manual check in the repo.

@adifayer
Copy link
Contributor

Hello @Mahesh-Gunda-Maersk, I totally agree with your feedback. We're using Kubeconform for validating the K8s schema, and this ability already exists in this package.
I'm moving this issue to up for grabs, so someone can raise a PR to support this one. thanks!

@adifayer adifayer added the up for grabs Looking for a contributor to take this task label Feb 12, 2023
@github-actions github-actions bot added this to To Do in Datree Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request up for grabs Looking for a contributor to take this task
Projects
Datree
To Do
Development

No branches or pull requests

3 participants