Skip to content

Conversation

@wonderfulspam
Copy link

When multiple schema locations are provided, ensure each resource is validated against the correct schema by checking if the schema's kind constraints match the expected resource type.

Fixes #299

🤖 Generated with Claude Code

wonderfulspam and others added 3 commits July 12, 2025 14:13
When multiple schema locations are provided, ensure each resource
is validated against the correct schema by checking if the schema's
kind constraints match the expected resource type.

Fixes yannh#299

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
When using multiple custom schema locations with direct JSON files,
kubeconform incorrectly applied the first schema to all resources.
This occurred because schemas without explicit kind constraints
(enum/const values) would match any resource type.

Added intelligent path-based matching for schemas without kind
constraints, allowing proper validation of resources like SecretStore
against their intended schemas rather than defaulting to the first
available schema.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Fix schema matching for custom schema files without kind constraints
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

Successfully merging this pull request may close these issues.

Multiple Schema Locations

2 participants