Skip to content

Fix Gateway API CRD validation to run in Linkerd check --pre instead of install#15050

Closed
gurpreet-singh-ji wants to merge 5 commits intolinkerd:mainfrom
gurpreet-singh-ji:feature-branch
Closed

Fix Gateway API CRD validation to run in Linkerd check --pre instead of install#15050
gurpreet-singh-ji wants to merge 5 commits intolinkerd:mainfrom
gurpreet-singh-ji:feature-branch

Conversation

@gurpreet-singh-ji
Copy link
Copy Markdown

Problem:
Gateway API CRD validation was incorrectly running during linkerd install instead of during linkerd check --pre, causing confusion and unnecessary failures before installation.

Solution:

Moved Gateway API CRD validation logic to execute during linkerd check --pre.

Updated relevant checks and messages to reflect the new validation flow.

Validation:

Ran linkerd check --pre and confirmed Gateway API CRDs are properly validated.

@cratelyn
Copy link
Copy Markdown
Member

@gurpreet-singh-ji it seems like this broke tests. you can run these yourself by running just go-test. i'm going to mark this as a draft until that's addressed.

@cratelyn cratelyn marked this pull request as draft March 16, 2026 18:03
Copy link
Copy Markdown
Member

@cratelyn cratelyn left a comment

Choose a reason for hiding this comment

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

a few nits.


return defaultValues
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: we shouldn't make unrelated whitespace changes.

Comment on lines -415 to 409
// if they are installed and managed by Linkerd, we cannot uninstall them
return errors.New("Linkerd is providing GW API, but your current install configuration will remove it")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why is the comment deleted, if there are not changes to the corresponding code?

Comment on lines 412 to 413
if installing {
// if they are installed but are external, we cannot be installing as well
return errors.New("Linkerd cannot install the Gateway API CRDs because they are already installed by an external source. Please set `installGatewayAPI` to `false`.")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same question as above.

gurpreet-cpu and others added 4 commits March 17, 2026 04:42
fixing the whitspaces and restoring old comments and also pass all th…
Fix Gateway API validation logic to avoid overwriting install state
@gurpreet-singh-ji
Copy link
Copy Markdown
Author

Hi @cratelyn, thanks for the feedback!

I’ve fixed the test issues, restored the comments, and removed unrelated changes.
I also ran go test ./... locally and everything is passing now.

Would appreciate another review when you get time. Thanks!

@cratelyn
Copy link
Copy Markdown
Member

it seems like tests still haven't been run. i think it's unlikely that we're disposed to accept this pull request. thank you for your time, i'm sorry about that.

@cratelyn cratelyn closed this Mar 17, 2026
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