Skip to content

Commit

Permalink
controller-runtime v0.16.2 updates
Browse files Browse the repository at this point in the history
Fix breaking changes from upgrade of controller-runtime.

Breaking changes from:
https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.16.0
- kubernetes-sigs/controller-runtime#2407
- kubernetes-sigs/controller-runtime#2416

HIVE-2254

Signed-off-by: Leah Leshchinsky <lleshchi@redhat.com>
  • Loading branch information
lleshchi committed Feb 2, 2024
1 parent 6cb89fd commit 8f7a284
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"

_ "github.com/openshift/generic-admission-server/pkg/cmd"

Expand Down Expand Up @@ -155,9 +156,9 @@ func newRootCommand() *cobra.Command {
run := func(ctx context.Context) {
// Create a new Cmd to provide shared dependencies and start components
mgr, err := manager.New(cfg, manager.Options{
Scheme: scheme.GetScheme(),
MetricsBindAddress: ":2112",
Logger: utillogrus.NewLogr(log.StandardLogger()),
Scheme: scheme.GetScheme(),
Metrics: metricsserver.Options{BindAddress: ":2112"},
Logger: utillogrus.NewLogr(log.StandardLogger()),
})
if err != nil {
log.Fatal(err)
Expand Down
7 changes: 4 additions & 3 deletions cmd/operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"

_ "github.com/openshift/generic-admission-server/pkg/cmd"

Expand Down Expand Up @@ -83,9 +84,9 @@ func newRootCommand() *cobra.Command {
run := func(ctx context.Context) {
// Create a new Cmd to provide shared dependencies and start components
mgr, err := manager.New(cfg, manager.Options{
Scheme: scheme.GetScheme(),
MetricsBindAddress: ":2112",
Logger: utillogrus.NewLogr(log.StandardLogger()),
Scheme: scheme.GetScheme(),
Metrics: metricsserver.Options{BindAddress: ":2112"},
Logger: utillogrus.NewLogr(log.StandardLogger()),
})
if err != nil {
log.Fatal(err)
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/common/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ func WaitForMachines(cfg *rest.Config, testFunc func([]*machinev1.Machine) bool,
scheme := scheme.GetScheme()

internalCache, err := cache.New(cfg, cache.Options{
Namespaces: []string{"openshift-machine-api"},
Scheme: scheme,
DefaultNamespaces: map[string]cache.Config{"openshift-machine-api": {}},
Scheme: scheme,
})
if err != nil {
return err
Expand Down

0 comments on commit 8f7a284

Please sign in to comment.