-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make command for redis and sentinel configurable
Signed-off-by: Julio Chana <[email protected]>
- Loading branch information
Julio Chana
committed
Mar 5, 2019
1 parent
a970bf6
commit 37d9aff
Showing
3 changed files
with
130 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37d9aff
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.
Since these commands are going to be used when launching the redis and sentinel instances I suggest to rename the introduced variables and functions to:
Command
=>InitCommand
getRedisCommand
=>getRedisInitCommand
getSentinelCommand
=>getSentinelInitCommand
37d9aff
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.
The name maintains the one defined by Kubernetes.
Command
means the command to be run when starting the container.There are a few things why I think
InitCommand
don't fit:initCommand
, Which command will be after that one?).InitCommand
can be interpreted as a previous command to be run, before running redis/sentinel. Also. it could be interpreted as the command for anInitContainer
.In general, I think that naming could cause confusion and I prefer to keep it as simple as possible and as similar to k8s as possible.
37d9aff
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 informative reply.
And now, I agree with you.