Skip to content

Commit

Permalink
Addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayja committed Dec 20, 2023
1 parent c0ae7ad commit d6e6aa1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/update-conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
var confUpdate = &cobra.Command{
Use: "update-conf",
Short: "update conf init functionality",
Long: `This command updates conf file of aerospike server and updating CR status.`,
Long: `This command updates conf file of aerospike server and CR status.`,
RunE: func(cmd *cobra.Command, args []string) error {
ctx := goctx.TODO()

Expand Down
9 changes: 2 additions & 7 deletions pkg/create-aerospike-conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ func (initp *InitParams) createAerospikeConf() error {

confString := string(data)

// Update node and rack ids configuration file
re := regexp.MustCompile("rack-id.*0")
if rackStr := re.FindString(confString); rackStr != "" {
confString = strings.ReplaceAll(confString, rackStr, "rack-id "+initp.rackID)
}

// Update node ids in configuration file
confString = strings.ReplaceAll(confString, "ENV_NODE_ID", initp.nodeID)

if initp.networkInfo.podPort != 0 {
Expand Down Expand Up @@ -78,7 +73,7 @@ func (initp *InitParams) createAerospikeConf() error {

fileScanner := bufio.NewScanner(readFile)

// Update mesh seeds in the configuration file
// Update mesh seeds in the configuration file
for fileScanner.Scan() {
peer := fileScanner.Text()
if strings.Contains(peer, initp.podName) {
Expand Down

0 comments on commit d6e6aa1

Please sign in to comment.