Skip to content

Commit

Permalink
[ISSUE apache#163] define path of mqadmin by environmental variable
Browse files Browse the repository at this point in the history
[ISSUE apache#163] define path of mqadmin by environmental variable
  • Loading branch information
RongtongJin authored Aug 4, 2023
2 parents ac98046 + a19844f commit 007810f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
// Package constants defines some global constants
package constants

import "os"

var (
rocketmqHome = os.Getenv("ROCKETMQ_HOME")

// AdminToolDir is the RocketMQ Admin directory in operator image
AdminToolDir = rocketmqHome + "/bin/mqadmin"
)

const (
// TODO: get paths by container ENV or actual value instead of fixed constant
DataPath = "/root"
Expand All @@ -28,9 +37,6 @@ const (
// BasicCommand is basic command of exec function
BasicCommand = "sh"

// AdminToolDir is the RocketMQ Admin directory in operator image
AdminToolDir = "/home/rocketmq/operator/bin/mqadmin"

// StoreConfigDir is the directory of config file
StoreConfigDir = DataPath + "/store/config"

Expand Down

0 comments on commit 007810f

Please sign in to comment.