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

v0.7.1 tag doesn't deploy ReferenceGrant CRD via Kustomize #2339

Closed
hawksight opened this issue Aug 22, 2023 · 2 comments
Closed

v0.7.1 tag doesn't deploy ReferenceGrant CRD via Kustomize #2339

hawksight opened this issue Aug 22, 2023 · 2 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@hawksight
Copy link

hawksight commented Aug 22, 2023

What happened:

When you download the v0.7.1 standard release yaml and extract just the CRD resource, there are 4 of them:

yq ea 'select(.kind == "CustomResourceDefinition") | .metadata.name' ~/Downloads/gateway-api-standard-install-v0.7.1.yaml 
gatewayclasses.gateway.networking.k8s.io
---
gateways.gateway.networking.k8s.io
---
httproutes.gateway.networking.k8s.io
---
referencegrants.gateway.networking.k8s.io

However when you run the following command it only returns 3 resources:

kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd?ref=v0.7.1" | yq ea '.metadata.name' -
gatewayclasses.gateway.networking.k8s.io
---
gateways.gateway.networking.k8s.io
---
httproutes.gateway.networking.k8s.io

The issue is that the kustomization file here does not include that resource, only the 3 other CRDs.

Note that release-0.7 branch is up to date with the relevant line added.

The issue is that some other provided reference the git branch directly in their documentation with kustomize such as in Openshift ServiceMesh here. Note that yes they suggest v0.4.0 however I wanted to apply the latest.

What you expected to happen:

I expected both the release and then tag would have the same behaviour. I think this commit just needs ported to the v0.7.1 tag? or a new v0.7.2 release might be needed?

How to reproduce it (as minimally and precisely as possible):

Not working

kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd?ref=v0.7.1" | yq ea '.metadata.name' -

Works:

curl https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.7.1/standard-install.yaml -L -O
yq ea 'select(.kind == "CustomResourceDefinition") | .metadata.name' ./standard-install.yaml

Anything else we need to know?:

This could be fixed in the RedHat docs for Openshift, but it still feels inconsistent here.

Also, this also fixes it by using the release branch as the ref instead:

kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd?ref=release-0.7" | yq ea '.metadata.name' -
@hawksight hawksight added the kind/bug Categorizes issue or PR as related to a bug. label Aug 22, 2023
@hawksight
Copy link
Author

hawksight commented Aug 22, 2023

Also for reference, if people were following istio docs but tweaking version, they might also encounter this issue.

Example they use:

kubectl get crd gateways.gateway.networking.k8s.io &> /dev/null || \
  { kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd?ref=v0.6.2" | kubectl apply -f -; }

Most people would probably assume to change from v0.6.2 to v0.7.1 and everything be correct.

@shaneutt shaneutt added this to the v0.8.0 milestone Aug 22, 2023
@robscott
Copy link
Member

Thanks for reporting this @hawksight!

This was fixed by #2084 and will be released in v0.8.0 (including the existing RC1 release).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
No open projects
Development

No branches or pull requests

3 participants