Skip to content

Commit

Permalink
added the right scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
facchettos committed Apr 8, 2024
1 parent 118eb69 commit 931bcc6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion e2e/test_plugin/syncers/interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/apiserver/pkg/endpoints/handlers/negotiation"
"k8s.io/apiserver/pkg/endpoints/handlers/responsewriters"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"

v2 "github.com/loft-sh/vcluster/pkg/plugin/v2"
corev1 "k8s.io/api/core/v1"
Expand All @@ -21,7 +22,10 @@ type DummyInterceptor struct {
}

func (d DummyInterceptor) ServeHTTP(w http.ResponseWriter, r *http.Request) {
s := serializer.NewCodecFactory(runtime.NewScheme())
scheme := runtime.NewScheme()
clientgoscheme.AddToScheme(scheme)

s := serializer.NewCodecFactory(scheme)
responsewriters.WriteObjectNegotiated(
s,
negotiation.DefaultEndpointRestrictions,
Expand Down

0 comments on commit 931bcc6

Please sign in to comment.