Skip to content

Commit

Permalink
Patch 0.16.3 updates
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Doherty <[email protected]>
  • Loading branch information
chrisdoherty4 committed Jan 12, 2024
1 parent 4a28b58 commit cd99dd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmd/tink-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"k8s.io/client-go/tools/clientcmd"
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/metrics/server"
)

// version is set at build time.
Expand Down Expand Up @@ -88,7 +89,7 @@ func NewRootCommand() *cobra.Command {
LeaderElection: config.EnableLeaderElection,
LeaderElectionID: "tink.tinkerbell.org",
LeaderElectionNamespace: namespace,
MetricsBindAddress: config.MetricsAddr,
Metrics: server.Options{BindAddress: config.MetricsAddr},
HealthProbeBindAddress: config.ProbeAddr,
}

Expand Down
5 changes: 4 additions & 1 deletion internal/server/kubernetes_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/cluster"
)
Expand Down Expand Up @@ -60,7 +61,9 @@ func NewKubeBackedServerFromREST(logger logr.Logger, config *rest.Config, namesp
clstr, err := cluster.New(config, func(opts *cluster.Options) {
opts.Scheme = controller.DefaultScheme()
opts.Logger = zapr.NewLogger(zap.NewNop())
opts.Cache.Namespaces = []string{namespace}
opts.Cache.DefaultNamespaces = map[string]cache.Config{
namespace: {},
}
})
if err != nil {
return nil, fmt.Errorf("init client: %w", err)
Expand Down

0 comments on commit cd99dd1

Please sign in to comment.