Skip to content

Commit

Permalink
fix port defitions
Browse files Browse the repository at this point in the history
  • Loading branch information
defo89 committed Jul 29, 2024
1 parent 0feff42 commit ed7ec9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions internal/cmd/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ func init() {
rootCmd.PersistentFlags().StringVar(&cfg.NodeName, "nodename", "", "Node hostname")
rootCmd.PersistentFlags().IntVar(&cfg.InterfaceMtu, "iface_mtu", 1500, "MTU size that replication interface should have")
// rootCmd.PersistentFlags().StringSliceVar(&cfg.Peers, "peers", nil, "Resend ICMP frag-needed packets to this peer list (comma separated)")
rootCmd.PersistentFlags().IntVar(&cfg.MetricsPort, "metrics_port", 30040, "Port for Prometheus metrics")
rootCmd.PersistentFlags().IntVar(&cfg.HealthPort, "health_port", 30041, "Port for healthz")
rootCmd.PersistentFlags().StringVar(&cfg.MetricsPort, "metrics_port", ":30040", "Port for Prometheus metrics")
rootCmd.PersistentFlags().StringVar(&cfg.HealthPort, "health_port", ":30041", "Port for healthz")
rootCmd.PersistentFlags().Uint16Var(&cfg.NfGroup, "nflog_group", 33, "NFLOG group")
rootCmd.PersistentFlags().IntVar(&cfg.TimeToLive, "ttl", 1, "TTL for resent packets")
rootCmd.PersistentFlags().IntVar(&cfg.ArpCacheTimeoutMinutes, "node-timeout-minutes", 5, "Timeout in minutes for node arp entry")
Expand Down Expand Up @@ -105,7 +105,7 @@ func runRootCmd(cmd *cobra.Command, args []string) error {
ctrl.SetLogger(log)
managerOpts := manager.Options{
Metrics: metricsserver.Options{BindAddress: strconv.Itoa(viper.GetInt("metrics_port"))},
HealthProbeBindAddress: ":" + strconv.Itoa(cfg.HealthPort),
HealthProbeBindAddress: cfg.HealthPort,
}
restConfig, err := config.GetConfigWithContext(cfg.KubeContext)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ type Config struct {
// Peers []string
InterfaceNames []string
NodeName string
MetricsPort int
HealthPort int
MetricsPort string
HealthPort string
TimeToLive int
NfGroup uint16
KubeContext string
Expand Down

0 comments on commit ed7ec9a

Please sign in to comment.