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

add v1 to various client schemes #2511

Merged
merged 3 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions conformance/conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package conformance_test
import (
"testing"

v1 "sigs.k8s.io/gateway-api/apis/v1"
dprotaso marked this conversation as resolved.
Show resolved Hide resolved
"sigs.k8s.io/gateway-api/apis/v1alpha2"
"sigs.k8s.io/gateway-api/apis/v1beta1"
"sigs.k8s.io/gateway-api/conformance/tests"
Expand Down Expand Up @@ -48,6 +49,7 @@ func TestConformance(t *testing.T) {

v1alpha2.AddToScheme(client.Scheme())
v1beta1.AddToScheme(client.Scheme())
v1.AddToScheme(client.Scheme())

supportedFeatures := suite.ParseSupportedFeatures(*flags.SupportedFeatures)
exemptFeatures := suite.ParseSupportedFeatures(*flags.ExemptFeatures)
Expand Down
2 changes: 2 additions & 0 deletions conformance/experimental_conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/yaml"

v1 "sigs.k8s.io/gateway-api/apis/v1"
"sigs.k8s.io/gateway-api/apis/v1alpha2"
"sigs.k8s.io/gateway-api/apis/v1beta1"
confv1a1 "sigs.k8s.io/gateway-api/conformance/apis/v1alpha1"
Expand Down Expand Up @@ -65,6 +66,7 @@ func TestExperimentalConformance(t *testing.T) {

v1alpha2.AddToScheme(mgrClient.Scheme())
v1beta1.AddToScheme(mgrClient.Scheme())
v1.AddToScheme(mgrClient.Scheme())

// standard conformance flags
supportedFeatures = suite.ParseSupportedFeatures(*flags.SupportedFeatures)
Expand Down
3 changes: 3 additions & 0 deletions gwctl/pkg/common/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"k8s.io/client-go/tools/clientcmd"
"sigs.k8s.io/controller-runtime/pkg/client"
fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake"
gatewayv1 "sigs.k8s.io/gateway-api/apis/v1"
gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
)
Expand All @@ -52,6 +53,7 @@ func NewK8sClients(kubeconfig string) (*K8sClients, error) {
}
gatewayv1alpha2.AddToScheme(client.Scheme())
gatewayv1beta1.AddToScheme(client.Scheme())
gatewayv1.AddToScheme(client.Scheme())

dc := dynamic.NewForConfigOrDie(restConfig)

Expand All @@ -66,6 +68,7 @@ func MustClientsForTest(t *testing.T, initRuntimeObjects ...runtime.Object) *K8s
scheme := scheme.Scheme
gatewayv1alpha2.AddToScheme(scheme)
gatewayv1beta1.AddToScheme(scheme)
gatewayv1.AddToScheme(scheme)
apiextensionsv1.AddToScheme(scheme)

fakeClient := fakeclient.NewClientBuilder().WithScheme(scheme).WithRuntimeObjects(initRuntimeObjects...).Build()
Expand Down