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

kubeconform + monitoring.coreos.com #257

Closed
fals opened this issue Jan 10, 2024 · 2 comments
Closed

kubeconform + monitoring.coreos.com #257

fals opened this issue Jan 10, 2024 · 2 comments

Comments

@fals
Copy link

fals commented Jan 10, 2024

I'm using kubeconform to validate my schemas, but I can't make it work with monitoring.coreos.com, and checking the last week commits had some fixes in the repo but still.

$ kubeconform -schema-location default -schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' -summary dev.yaml
helm-charts/artifacts/dev.yaml - CustomResourceDefinition alertmanagers.monitoring.coreos.com failed validation: could not find schema for CustomResourceDefinition
helm-charts/artifacts/dev.yaml - CustomResourceDefinition probes.monitoring.coreos.com failed validation: could not find schema for CustomResourceDefinition
helm-charts/artifacts/dev.yaml - CustomResourceDefinition podmonitors.monitoring.coreos.com failed validation: could not find schema for CustomResourceDefinition
helm-charts/artifacts/dev.yaml - CustomResourceDefinition alertmanagerconfigs.monitoring.coreos.com failed validation: could not find schema for CustomResourceDefinition
helm-charts/artifacts/dev.yaml - CustomResourceDefinition prometheusagents.monitoring.coreos.com failed validation: could not find schema for CustomResourceDefinition
helm-charts/artifacts/dev.yaml - CustomResourceDefinition prometheusrules.monitoring.coreos.com failed validation: could not find schema for CustomResourceDefinition
helm-charts/artifacts/dev.yaml - CustomResourceDefinition scrapeconfigs.monitoring.coreos.com failed validation: could not find schema for CustomResourceDefinition
helm-charts/artifacts/dev.yaml - CustomResourceDefinition servicemonitors.monitoring.coreos.com failed validation: could not find schema for CustomResourceDefinition
helm-charts/artifacts/dev.yaml - CustomResourceDefinition prometheuses.monitoring.coreos.com failed validation: could not find schema for CustomResourceDefinition
helm-charts/artifacts/dev.yaml - CustomResourceDefinition thanosrulers.monitoring.coreos.com failed validation: could not find schema for CustomResourceDefinition
Summary: 152 resources found in 1 file - Valid: 142, Invalid: 0, Errors: 10, Skipped: 0

Am I missing something?

kubeconform v0.6.4

@Skaronator
Copy link
Contributor

Yeah, you need to define a schema location for CustomResourceDefinitions (don't confuse it with actual CR).

I had the same issue and documented my findings in the kubeconform repository: yannh/kubeconform#51 (comment)

@fals
Copy link
Author

fals commented Mar 13, 2024

@Skaronator this is exactly what I needed. I believe this should be somehow part of the documentation, it is quite confusing indeed the usage of the CDRs vs CRs

@fals fals closed this as completed Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants