-
Notifications
You must be signed in to change notification settings - Fork 14
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
#1959-Stage SIMS Prod #2008
#1959-Stage SIMS Prod #2008
Conversation
@@ -286,7 +286,9 @@ deploy-redis: | |||
# Command to initialize the redis cluster. | |||
# Make sure that all the redis pods are up and running before initializing the cluster. | |||
init-redis-cluster: | |||
@oc exec -n $(NAMESPACE) -it redis-0 -- redis-cli -a $(oc get secret -n $(NAMESPACE) redis-creds -o jsonpath='{.data.password}' | base64 -d) --cluster create --cluster-replicas 1 $(oc get pods -n $(NAMESPACE) -l app=redis -o jsonpath='{range.items[*]}{.status.podIP}:6379 ') | |||
REDIS_PASSWORD=$$(oc get secret -n $(NAMESPACE) redis-creds -o jsonpath='{.data.password}' | base64 -d); \ | |||
REDIS_NODES=$$(oc get pods -n $(NAMESPACE) -l app=redis -o jsonpath='{range .items[*]}{.status.podIP}:6379 ' | sed 's/ :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.
Executing the command
oc get pods -n 0c27fb-dev -l app=redis -o jsonpath='{range .items[*]}{.status.podIP}:6379 ' | sed 's/ :6379 $$/ /'
Is still returning the extra :6379
at the end, as shown below. Is it the expectation?
10.97.50.200:6379 10.97.38.75:6379 10.97.70.236:6379 10.97.94.99:6379 10.97.56.98:6379 10.97.101.99:6379 :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.
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 see that echo
is correctly printing it. Thanks for the explanation 😉
Kudos, SonarCloud Quality Gate passed! |
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.
Nice fix, looks good 👍
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 fix. As discussed we can have a ticket created for platform agnostic script which works on all types of terminal.
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.
👍
Redis cluster command changed, as part of makefile to run in any terminal(Windows/ mac/ Linux).
oc get pods -n $(NAMESPACE) -l app=redis -o jsonpath='{range .items[*]}{.status.podIP}:6379
in mac it appends an additional:6379
at the end, so to solve it removing the generated one using the sed command.Documentation and wiki documentation are updated