Skip to content

Commit

Permalink
fix hostname
Browse files Browse the repository at this point in the history
Signed-off-by: Jaehyun Nam <[email protected]>
  • Loading branch information
nam-jaehyun committed May 20, 2022
1 parent 418554a commit 631c0ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion KubeArmor/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package config

import (
"os"
"strings"

"flag"

Expand Down Expand Up @@ -90,7 +91,7 @@ const ConfigK8sEnv string = "k8s"
func readCmdLineParams() {
hostname, _ := os.Hostname()
clusterStr := flag.String(ConfigCluster, "default", "cluster name")
hostStr := flag.String(ConfigHost, hostname, "host name")
hostStr := flag.String(ConfigHost, strings.Split(hostname, ".")[0], "host name")

grpcStr := flag.String(ConfigGRPC, "32767", "gRPC port number")
logStr := flag.String(ConfigLogPath, "/tmp/kubearmor.log", "log file path, {path|stdout|none}")
Expand Down

0 comments on commit 631c0ad

Please sign in to comment.