Skip to content

Commit

Permalink
Remove default scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
jveski committed Nov 21, 2023
1 parent d522bcf commit ec4e376
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/controllers/reconciliation/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"

"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/jsonmergepatch"
"k8s.io/apimachinery/pkg/util/strategicpatch"
Expand All @@ -17,8 +18,6 @@ import (
"github.com/go-logr/logr"
)

// TODO: Is scheme used?

type Controller struct {
client client.Client
resourceClient reconstitution.Client
Expand All @@ -28,7 +27,9 @@ type Controller struct {
}

func New(mgr *reconstitution.Manager, downstream *rest.Config, discoveryRPS float32, rediscoverWhenNotFound bool) error {
upstreamClient, err := client.New(downstream, client.Options{})
upstreamClient, err := client.New(downstream, client.Options{
Scheme: runtime.NewScheme(), // empty scheme since we shouldn't rely on compile-time types
})
if err != nil {
return err
}
Expand Down

0 comments on commit ec4e376

Please sign in to comment.