-
Notifications
You must be signed in to change notification settings - Fork 22
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
Use resource pattern resolver to look up CRDs from classpath #196
Use resource pattern resolver to look up CRDs from classpath #196
Conversation
|
||
private Resource[] findResources() { | ||
final var resourceResolver = new PathMatchingResourcePatternResolver(); | ||
final var resourceLocationPattern = crdPath + '*' + crdSuffix; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Users may find it more useful if they can specify the entire location pattern or even a set of patterns (e.g., META-INF/fabric8/*-v1.yml
and META-INF/fabric8/*-v2.yml
). This is a breaking change and outside the scope of the fix, so let me leave it for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi @ajalab thank you for PR, could you pls format the code, simply by running thank you! |
Thanks! |
Umm, according to the test result, there is something wrong in the CRD registration in some tests. Let me work on the fix and let you know after finishing it. |
It turned out that the test was failed because the previous path concatenation could not handle |
thank you! |
fixes #195.
This PR updates
DefaultCRDApplier
to usePathMatchingResourcePatternResolver
to look up CRD manifests from Java classpath resources in arbitrary formats, including JARs pulled from a dependency.