Skip to content

Commit

Permalink
fix bug for AERAKI_IS_MASTER env
Browse files Browse the repository at this point in the history
  • Loading branch information
tanjunchen committed Jun 9, 2023
1 parent 4b8f210 commit 20f0dac
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cmd/aeraki/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,17 @@ func main() {
args.ServerID = "Aeraki-" + uuid.New().String()
}

args.PodName = env.RegisterStringVar("POD_NAME", args.ServerID, "").Get()
args.Master = env.RegisterBoolVar("AERAKI_IS_MASTER", args.Master, "").Get()
args.AerakiXdsAddr = env.RegisterStringVar("AERAKI_XDS_ADDR", args.AerakiXdsAddr, "").Get()
args.AerakiXdsPort = env.RegisterStringVar("AERAKI_XDS_PORT", args.AerakiXdsPort, "").Get()
args.IstiodAddr = env.RegisterStringVar("AERAKI_ISTIOD_ADDR", args.IstiodAddr, "").Get()
args.RootNamespace = env.RegisterStringVar("AERAKI_NAMESPACE", args.RootNamespace, "").Get()
args.ClusterID = env.RegisterStringVar("AERAKI_CLUSTER_ID", args.ClusterID, "").Get()
args.ConfigStoreSecret = env.RegisterStringVar("AERAKI_ISTIO_CONFIG_STORE_SECRET",
args.ConfigStoreSecret, "").Get()
args.LogLevel = env.RegisterStringVar("AERAKI_LOG_LEVEL", args.LogLevel, "").Get()
args.EnableEnvoyFilterNSScope = env.RegisterBoolVar("AERAKI_ENABLE_ENVOY_FILTER_NS_SCOPE",
args.EnableEnvoyFilterNSScope, "").Get()
args.IstiodAddr = env.RegisterStringVar("AERAKI_ISTIOD_ADDR", args.IstiodAddr, "").Get()
args.AerakiXdsAddr = env.RegisterStringVar("AERAKI_XDS_ADDR", constants.DefaultAerakiXdsAddr, "").Get()
args.AerakiXdsPort = env.RegisterStringVar("AERAKI_XDS_PORT", constants.DefaultAerakiXdsPort, "").Get()

flag.VisitAll(func(flag *flag.Flag) {
log.Infof("Aeraki parameter: %s: %v", flag.Name, flag.Value)
Expand Down

0 comments on commit 20f0dac

Please sign in to comment.