Skip to content

Fix: Object calling issue#5328

Merged
shani34 merged 12 commits into
mainfrom
shani/fix-object-calling
May 21, 2026
Merged

Fix: Object calling issue#5328
shani34 merged 12 commits into
mainfrom
shani/fix-object-calling

Conversation

@shani34
Copy link
Copy Markdown
Contributor

@shani34 shani34 commented May 18, 2026

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.

@shani34 shani34 requested review from a team as code owners May 18, 2026 19:39
Comment thread charts/consul/templates/consul-crd-gateways-external.yaml
@shani34 shani34 added the backport/2.0.x Backport to release/2.0.x branch label May 20, 2026
Comment thread charts/consul/templates/consul-crd-grpcroutes-external.yaml
Comment thread charts/consul/templates/consul-crd-referencegrants-external.yaml
Comment thread charts/consul/templates/generate-manifests-clusterrole.yaml
Comment thread charts/consul/templates/consul-crd-httproutes-external.yaml
Copy link
Copy Markdown
Contributor

@vdinesh4738 vdinesh4738 left a comment

Choose a reason for hiding this comment

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

Please test before merge and update the comment.

@shani34
Copy link
Copy Markdown
Contributor Author

shani34 commented May 20, 2026

tested based on our conversation

  1. Deploy the consul version 1.21 and control plane 1.8 in k8s cluster
  2. Perform helm upgrade using the latest template and 2.0 rc2 consul image and consul k8s

it working fine,

lets connect tomorrow and merge this @vdinesh4738

@shani34 shani34 merged commit 6caf806 into main May 21, 2026
44 of 45 checks passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/2.0.x Backport to release/2.0.x branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants