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

Fix namespace checking when validating additional schemas which are not namespaced #822

Merged

Conversation

ivanfetch-wt
Copy link
Contributor

Checklist

  • I have signed the CLA
  • I have updated/added any relevant documentation

Description

What's the goal of this PR?

Fix namespace filtering during additional schema validation, so the additional schema will return Kube resources if the primary schema resource is namespaced and the additional schema is not.

For example, a primary schema of roleBinding and an additional schema of ClusterRole.

What changes did you make?

I short-circuited the boolean statement that matches namespaces for primary schema and secondary schema resources, if the secondary has no namespace.

@fairwinds-insights
Copy link

Fairwinds Insights CI Report

View the Full Report

✅ No new Action Items detected!

@ivanfetch-wt ivanfetch-wt enabled auto-merge (squash) August 18, 2022 21:01
@ivanfetch-wt ivanfetch-wt merged commit e3a6cb3 into master Aug 19, 2022
@ivanfetch-wt ivanfetch-wt deleted the if/fix-additionalschemas-for-namespaced-primaries branch August 19, 2022 00:34
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.

2 participants