solo-io / gloo

The Feature-rich, Kubernetes-native, Next-Generation API Gateway Built on Envoy
https://docs.solo.io/
Apache License 2.0
4.08k stars 437 forks source link

[gloo/cli]: Uses v1.0.0-rc1 CRDs instead of v1.0.0 #10115

Open danehans opened 2 days ago

danehans commented 2 days ago

Gloo Edge Product

Open Source

Gloo Edge Version

v1.17.7

Kubernetes Version

1.28.1

Describe the bug

GatewayCrds is a public variable that is a []byte of Gateway API CRDs:

$ grep -ri "v1.0.0" projects/gateway2
projects/gateway2/crds/gateway-crds.yaml:    gateway.networking.k8s.io/bundle-version: v1.0.0-rc1
projects/gateway2/crds/gateway-crds.yaml:    gateway.networking.k8s.io/bundle-version: v1.0.0-rc1
projects/gateway2/crds/gateway-crds.yaml:    gateway.networking.k8s.io/bundle-version: v1.0.0-rc1
projects/gateway2/crds/gateway-crds.yaml:    gateway.networking.k8s.io/bundle-version: v1.0.0-rc1

As you can see from the output above, these CRDs are based on rc1 instead of the final v1.0.0 release.

This variable is used throughout the gloo cli codebase:

$ grep -ri GatewayCrds .
./projects/gateway2/crds/crds.go:var GatewayCrds []byte
./projects/gloo/cli/pkg/cmd/install/kubegateway/uninstall.go:   crds, err := deployer.ConvertYAMLToObjects(cli.Scheme(), crds.GatewayCrds)
./projects/gloo/cli/pkg/cmd/install/kubegateway/install.go: crdsExist, err := kubegatewayutils.DetectKubeGatewayCrds(cfg)
./projects/gloo/cli/pkg/cmd/install/kubegateway/install.go:     crds, err := deployer.ConvertYAMLToObjects(cli.Scheme(), crds.GatewayCrds)
./projects/gloo/cli/pkg/cmd/check/kube_gateway.go:  hasCRDs, err := kubegatewayutils.DetectKubeGatewayCrds(cfg)
./projects/gloo/cli/pkg/kubegatewayutils/detect.go:func DetectKubeGatewayCrds(cfg *rest.Config) (bool, error) {

Expected Behavior

That v1.0.0 CRDs are being used by the gloo cli.

Steps to reproduce the bug

Review the steps above or use gloo cli to install.

Additional Environment Detail

N/A

Additional Context

N/A

┆Issue is synchronized with this Asana task by Unito

timflannagan commented 2 days ago

Yep, I noticed this locally as well. There's skew between the GW API version being configured in the ci/kind/setup-kind.sh bash script and what's embedded in the install CLI code too.