Fix: Object calling issue#5328
Merged
Merged
Conversation
vdinesh4738
reviewed
May 20, 2026
…rp/consul-k8s into shani/fix-object-calling
vdinesh4738
reviewed
May 20, 2026
vdinesh4738
approved these changes
May 20, 2026
Contributor
vdinesh4738
left a comment
There was a problem hiding this comment.
Please test before merge and update the comment.
Contributor
Author
|
tested based on our conversation
it working fine, lets connect tomorrow and merge this @vdinesh4738 |
vdinesh4738
pushed a commit
that referenced
this pull request
May 27, 2026
* updated yaml * Fix HTTPRoute generic collision by adding correct shortNames * removed unnecessary changes * Add changelog for PR 5328 * updated changelog * revert not needed changes * revert not needed changes * Restore RBAC rules for c-prefixed CRDs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue:
The Issue When both Consul and Gateway API HTTPRoute CRDs are installed, kubectl encounters a naming ambiguity. Because the plurals clash, kubectl get httproutes defaulted to resolving consul.hashicorp.com instead of the expected gateway.networking.k8s.io.
The Fix We resolved the collision by adding explicit shortNames to the CRD definitions in both the Helm templates and the static control-plane/config CRDs. This forces kubectl to route specific CLI aliases to the correct API groups:
Added shortNames: [httproutes] to the Gateway API CRD (httproutes.gateway.networking.k8s.io).
Added shortNames: [chttproutes] to the Consul API CRD (chttproutes.consul.hashicorp.com / httproutes.consul.networking.io).
Verification of fix
Cluster Setup: Created a fresh local Kubernetes cluster using kind create cluster.
Apply CRDs: Applied both updated gateway and consul HTTPRoute CRD YAMLs to the cluster.
Invalidate Cache: Ran kubectl api-resources --invalidate-cache to ensure a fresh API discovery state.
Validation:
Ran kubectl explain httproutes | grep GROUP → successfully returned the gateway.networking.k8s.io API group.
Ran kubectl explain chttproutes | grep GROUP → successfully returned the consul.hashicorp.com API group.