✨ Support extenion compat with addon as regex. #782
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Both the analyzer and tech-discovery both use the same providers. An extension having compatibility with multiple addons is not a common/mainstream use case. To get around this, we have defined a duplicate set of extensions for each provider. One with compatibility with the
analyzer
addon and the other for thetech-discovery
addon.After a recent refactor of the generic extension into multiple extensions (go, python, nodejs), it became obvious that maintain the duplicate set of extensions is painful and likely error prone.
It seems a better approach is to change
Extention.Spec.Addon
to (optionally) define a regex. This approach caters to the mainstream use case that extensions have compatibility with one addon. It also avoids making the field an array requiring a CRD change. This is which is MUCH simpler.The existing extensions will need to be updated to be compatible with both addons.
Example (java extension):
The
discovery-
extensions would be deleted.