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

Make GrpcRoute watches optional #12917

Merged
merged 2 commits into from
Jul 31, 2024
Merged

Make GrpcRoute watches optional #12917

merged 2 commits into from
Jul 31, 2024

Conversation

adleong
Copy link
Member

@adleong adleong commented Jul 30, 2024

Since the GrpcRoute CRD is not included in the Gateway API version 0.7.0 standard, we cannot rely on it being present in all clusters. Therefore, we make the GrpcRoute watch in the policy controller optional, conditioned on if the API resource exists. In fact, we do this for all HttpRoute as well.

This means that if either of these CRDs are not present on the cluster at the time that the policy controller is started, we will not initiate watches on that type and it will not be possible to use those resources for policy until the CRD is installed and the policy controller is restarted. We log at startup if any watches are skipped in this way.

Furthermore, we relax the linkerd check validation of CRDs to not require that gateway API CRDs are present.

@adleong adleong requested a review from a team as a code owner July 30, 2024 21:46
Comment on lines +146 to +149
err = renderCRDs(&crdManifest, valuespkg.Options{
// GatewayAPI CRDs are optional so don't check for them.
Values: []string{"enableHttpRoutes=false"},
}, "yaml")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a separate change Unrelated to the policy controller. Can we split it out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, but I consider both of these to be part of the same feature -- that Linkerd should work when the GrpcRoute CRD is absent.

@adleong adleong merged commit 5361917 into main Jul 31, 2024
46 checks passed
@adleong adleong deleted the alex/watches-optional branch July 31, 2024 19:03
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