Skip to content

Commit

Permalink
fix update of controller runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattes83 committed Jan 5, 2024
1 parent e24a26e commit 42c7ab6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion api/v1alpha1/ionoscloudmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ type IONOSCloudMachineStatus struct {
//+kubebuilder:printcolumn:name="Ram",type=integer,JSONPath=`.spec.ram`
//+kubebuilder:printcolumn:name="ProviderID",type=string,JSONPath=`.spec.providerID`


// IONOSCloudMachine is the Schema for the ionoscloudmachines API
type IONOSCloudMachine struct {
metav1.TypeMeta `json:",inline"`
Expand Down
7 changes: 4 additions & 3 deletions api/v1alpha1/webhook_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/envtest"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
)

// These tests use Ginkgo (BDD-style Go testing framework). Refer to
Expand Down Expand Up @@ -81,9 +82,9 @@ var _ = BeforeSuite(func() {

// start webhook server using Manager
mgr, err := ctrl.NewManager(cfg, ctrl.Options{
Scheme: scheme,
LeaderElection: false,
MetricsBindAddress: "0",
Scheme: scheme,
LeaderElection: false,
Metrics: metricsserver.Options{BindAddress: "0"},
})
Expect(err).NotTo(HaveOccurred())

Expand Down
4 changes: 2 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"

clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"

Expand Down Expand Up @@ -72,8 +73,7 @@ func main() {

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,
Port: 9443,
Metrics: metricsserver.Options{BindAddress: metricsAddr},
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionID: "2606507e.cluster.x-k8s.io",
Expand Down

0 comments on commit 42c7ab6

Please sign in to comment.