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

chore: check if AIGateway CRD exists in the cluster before creating a count provider #360

Merged

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Jun 20, 2024

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:

    report: <14>signal=gateway-operator-start;hn=P-Maek-MBP;uptime=0;v=NOT_SET;k8s_aigateways_count=1;k8s_controlplanes_count=0;k8s_controlplanes_requested_replicas_count=0;k8s_dataplanes_count=0;k8s_dataplanes_requested_replicas_count=0;k8s_gatewayclasses_count=1;k8s_gateways_count=0;k8s_httproutes_count=0;k8s_nodes_count=1;k8s_pods_count=14;k8s_referencegrants_count=0;k8s_services_count=4;k8s_standalone_controlplanes_count=0;k8s_standalone_dataplanes_count=0;k8s_arch=linux/arm64;k8s_provider=kind;k8sv=v1.30.0;k8sv_semver=v1.30.0;
    

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

@pmalek pmalek added this to the KGO v1.3.x milestone Jun 20, 2024
@pmalek pmalek self-assigned this Jun 20, 2024
@pmalek pmalek requested a review from a team as a code owner June 20, 2024 18:53
internal/telemetry/telemetry_test.go Outdated Show resolved Hide resolved
internal/telemetry/telemetry_test.go Outdated Show resolved Hide resolved
@randmonkey
Copy link
Contributor

randmonkey commented Jun 21, 2024

Does this PR need a changelog entry?

pmalek and others added 2 commits June 21, 2024 11:45
Co-authored-by: Travis Raines <571832+rainest@users.noreply.github.com>
@pmalek pmalek requested review from rainest and a team June 21, 2024 09:54
@pmalek
Copy link
Member Author

pmalek commented Jun 21, 2024

Does this PR need a changelog entry?

@randmonkey No need for changelog, this is not user facing.

@rainest rainest merged commit 54e7a8a into main Jun 21, 2024
20 checks passed
@rainest rainest deleted the check-if-AIGateway-exists-before-creating-count-provider branch June 21, 2024 20:17
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.

None yet

3 participants