Skip to content

Commit

Permalink
Merge pull request #28 from Mellanox/fix-common-ports
Browse files Browse the repository at this point in the history
Disable metrics and health checks ports in config daemon
  • Loading branch information
almaslennikov authored Oct 16, 2024
2 parents 6e994db + ebd9c01 commit b1f64b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/nic-configuration-daemon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/log"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"

"github.com/Mellanox/nic-configuration-operator/api/v1alpha1"
"github.com/Mellanox/nic-configuration-operator/internal/controller"
Expand All @@ -36,6 +37,9 @@ func main() {

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
// Setting bind address to 0 disables the health probe / metrics server
HealthProbeBindAddress: "0",
Metrics: metricsserver.Options{BindAddress: "0"},
})
if err != nil {
log.Log.Error(err, "unable to create manager")
Expand Down

0 comments on commit b1f64b3

Please sign in to comment.