Skip to content

Commit

Permalink
Fix SD error updating Openshift operator DNS instance
Browse files Browse the repository at this point in the history
This error was observed from the ServiceDiscovery controller:

"error updating Openshift DNS operator: no kind is registered
for the type v1.DNS in scheme
\"k8s.io/client-go/kubernetes/scheme/register.go:79\""

The Openshift operator types are added to the scheme used by the
controller manager but the GeneralClient needs to be set up with
the same scheme.

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
  • Loading branch information
tpantelis committed Jul 22, 2024
1 parent bf91123 commit 58af96b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ func main() {
os.Exit(1)
}

generalClient, _ := client.New(mgr.GetConfig(), client.Options{})
generalClient, _ := client.New(mgr.GetConfig(), client.Options{
Scheme: scheme,
})

if err = submariner.NewReconciler(&submariner.Config{
ScopedClient: mgr.GetClient(),
Expand Down

0 comments on commit 58af96b

Please sign in to comment.