Skip to content
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

Merged
merged 1 commit into from
Feb 18, 2019

Conversation

marcemq
Copy link
Contributor

@marcemq marcemq commented Feb 14, 2019

Changes proposed on the PR:

  • Add sentinelConfigFileNameContent, redisConfigFileNameContent and shutdownContent to hold the proper content of each CongifMap data entry.

Signed-off-by: Morales Quispe, Marcela [email protected]

@marcemq marcemq requested review from ese, jchanam and slok as code owners February 14, 2019 23:36
Copy link
Collaborator

@jchanam jchanam left a 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
Copy link
Collaborator

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

Copy link
Contributor Author

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
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll change it 😊

@marcemq
Copy link
Contributor Author

marcemq commented Feb 15, 2019

Do you think moving the content of the file improves readability? Is there more motivations to move the content of the files to variables?
Yes 😊

Signed-off-by: Morales Quispe, Marcela <[email protected]>
Copy link
Member

@ese ese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Collaborator

@jchanam jchanam left a 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!

@ese ese merged commit c12bdee into spotahome:master Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants