func()

in cmd/controller/main.go [99:115]


func (s *Server) setupConfig() error {
	config.ServerConfigPath = "./configs/controller.yaml"
	// compatible local environment
	if !util.Exists(config.ServerConfigPath) {
		config.ServerConfigPath = "../configs/controller.yaml"
	}
	// compatible deploy environment
	if !util.Exists(config.ServerConfigPath) {
		config.ServerConfigPath = "../conf/controller.yaml"
	}
	cfg, err := config.LoadConfig(config.ServerConfigPath)
	if err != nil {
		return err
	}
	config.SetGlobalConfig(cfg)
	return config.Setup(cfg)
}