datreeio / datree

Prevent Kubernetes misconfigurations from reaching production (again 😤 )! From code to cloud, Datree provides an E2E policy enforcement solution to run automatic checks for rule violations. See our docs: https://hub.datree.io
https://datree.io
Apache License 2.0
6.39k stars 363 forks source link

could not find schema for PodDisruptionBudget #867

Closed pdeva closed 1 year ago

pdeva commented 1 year ago

Describe the bug datree fails with error when using kustomize module: k8s schema validation error: could not find schema for PodDisruptionBudget

To Reproduce

  1. create folder base with kustomization.yaml that points to a PodDisruptionBudget resource
  2. run datree kustomize test base

Expected behavior should show no error

Screenshots If applicable, add screenshots to help explain your problem.

Screenshot 2023-01-18 at 7 17 56 PM

Desktop (please complete the following information):

Datree version (run datree version):

Client ID (cat ~/.datree/config.yaml):

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

eyarz commented 1 year ago

PodDisruptionBudget became stable in K8s version 1.21. From your screenshot, I can see that you are using schema version 1.20: image

You need to change your default schema version to match your cluster version: https://hub.datree.io/cli/schema-validation

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.