Skip to content

Commit

Permalink
Revert "Replaces flag --metrics-port with --metrics-addresss"
Browse files Browse the repository at this point in the history
This reverts commit 528c7bb.
  • Loading branch information
nkinkade committed Aug 4, 2023
1 parent 528c7bb commit c7fb90f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cmd/kured/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var (
drainTimeout time.Duration
rebootDelay time.Duration
period time.Duration
metricsAddress string
metricsPort int
drainGracePeriod int
drainPodSelector string
skipWaitForDeleteTimeoutSeconds int
Expand Down Expand Up @@ -126,8 +126,8 @@ func NewRootCommand() *cobra.Command {
"node name kured runs on, should be passed down from spec.nodeName via KURED_NODE_ID environment variable")
rootCmd.PersistentFlags().BoolVar(&forceReboot, "force-reboot", false,
"force a reboot even if the drain fails or times out")
rootCmd.PersistentFlags().StringVar(&metricsAddress, "metrics-address", ":8080",
"address where metrics will listen")
rootCmd.PersistentFlags().IntVar(&metricsPort, "metrics-port", 8080,
"port number where metrics will listen")
rootCmd.PersistentFlags().IntVar(&drainGracePeriod, "drain-grace-period", -1,
"time in seconds given to each pod to terminate gracefully, if negative, the default value specified in the pod will be used")
rootCmd.PersistentFlags().StringVar(&drainPodSelector, "drain-pod-selector", "",
Expand Down Expand Up @@ -844,5 +844,5 @@ func root(cmd *cobra.Command, args []string) {
go maintainRebootRequiredMetric(nodeID, hostSentinelCommand)

http.Handle("/metrics", promhttp.Handler())
log.Fatal(http.ListenAndServe(metricsAddress, nil))
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", metricsPort), nil))
}
1 change: 0 additions & 1 deletion kured-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,3 @@ spec:
# - --annotate-nodes=false
# - --lock-release-delay=30m
# - --log-format=text
# - --metricsAddress=:8080

0 comments on commit c7fb90f

Please sign in to comment.