chore: check if AIGateway CRD exists in the cluster before creating a count provider #360
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.
What this PR does / why we need it:
Prevent users being confused by the error message being logged when AIGateway count provider fails to get created
Related issue: Controller wants to watch incorrect resource kind "aigatewaies" #297
Additionally this creates a CRD guard so that when user requests AIGateway controller but the CRD is not in place then controller exits with an error.
This also fixes the aigateway reports in telemetry. For some reason (probably due to the incorrect pluralized version
aigatewies
used in AIGateway GVR).The reports now include the AIGateway entry:
Special notes for your reviewer:
For whatever reason the tests do not allow the full suite to pass as it used to. It's most likely relate to the pluralising issue in k8s: kubernetes/client-go#1082