Skip to content

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
@adleong adleong deleted the alex/watches-optional branch July 31, 2024 19:03
adleong added a commit that referenced this pull request Feb 12, 2025
In #12917 we made the Gateway API CRDs optional in Linkerd and updated the `linkerd check` command to no longer error if these CRDs were not present.  However, we missing making the corresponding change in `linkerd install`.  As a result, `linkerd install` returns an error if the Gateway API CRDs are not installed on the cluster.

We add the corresponding change to `linkerd install` so that it no longer returns an error if the Gateway API CRDs are not installed.

Signed-off-by: Alex Leong <[email protected]>
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.

3 participants