-
Notifications
You must be signed in to change notification settings - Fork 591
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
chore: use the same tag in Makefile as in code when installing Gateway API CRDs #2567
chore: use the same tag in Makefile as in code when installing Gateway API CRDs #2567
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bitrot alert. go.mod
today references v0.4.1-0.20220306235253-71fee1c2808f
and it's guaranteed that discrepancies between the version in go.mod
, in the makefile and in the test as changed in #2551 will keep reappearing.
Can we do something to have a single source of truth for the gateway api version?
Maybe, rather than referring to a specific release from github, we can kustomize build
the kustomization already downloaded to $(go env GOPATH)/pkg/mod/sigs.k8s.io/[email protected]
? Or somehow else ensure that the version in go.mod is authoritative.
Maybe that's an excess of form over content, just wanted to bring this up for your consideration.
4cce278
to
242ad67
Compare
Agreed, and that's actually a great idea. PTAL at what's proposed in https:/Kong/kubernetes-ingress-controller/pull/2567/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52 |
242ad67
to
9a8db1d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would you feel about changing the code in internal/util/test/crds.go from the previous PR to accept the version from the environment, so that we don't have to update that going forward?
Do you have an environment variable in mind or something else? What we could do is to make a separate file for that URL and add a |
I'm not opposed to making it a generated var, however this does preclude the notion that someone could seed the value with an environment variable, so maybe just do a combination of both? |
9a8db1d
to
544ad57
Compare
544ad57
to
9c01b1c
Compare
9c01b1c
to
2e32784
Compare
9a16ea1
to
100b8e0
Compare
100b8e0
to
81720bc
Compare
81720bc
to
8679215
Compare
8679215
to
be6366f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just like to see us put the link to the TODO follow up into the Makefile
and then lgtm
be6366f
to
d4bffb2
Compare
What this PR does / why we need it:
In order to use the same version of Gateway API CRDs when installing them via Makefile as in the Go code.
This PR adds a make target
generate.gateway-api-crds-url
that generatestest/consts/gateway.go
(fromtest/internal/cmd/generate-gateway-api-crds-url/gateway_consts.tmpl
) using./test/internal/cmd/generate-gateway-api-crds-url/main.go
.If one would like to override the version then it's as simple as adding
GATEWAY_API_VERSION
to the make target invocation like so:Related PR that fixed it in Go code: #2551