-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add config content variables for readability. #113
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think moving the content of the file improves readability? Is there more motivations to move the content of the files to variables?
@@ -88,6 +88,10 @@ func generateSentinelConfigMap(rf *redisfailoverv1alpha2.RedisFailover, labels m | |||
namespace := rf.Namespace | |||
|
|||
labels = util.MergeLabels(labels, generateLabels(sentinelRoleName, rf.Name)) | |||
sentinelConfigFileNameContent := `sentinel monitor mymaster 127.0.0.1 6379 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rename this to sentinelConfigFileContent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change it 😊
@@ -110,6 +111,10 @@ func generateRedisConfigMap(rf *redisfailoverv1alpha2.RedisFailover, labels map[ | |||
namespace := rf.Namespace | |||
|
|||
labels = util.MergeLabels(labels, generateLabels(redisRoleName, rf.Name)) | |||
redisConfigFileNameContent := `slaveof 127.0.0.1 6379 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rename this to redisConfigFileContent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change it 😊
|
Signed-off-by: Morales Quispe, Marcela <[email protected]>
32d9d8f
to
56374d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the improvement!
Changes proposed on the PR:
sentinelConfigFileNameContent
,redisConfigFileNameContent
andshutdownContent
to hold the proper content of eachCongifMap
data entry.Signed-off-by: Morales Quispe, Marcela [email protected]