vorburger commented on a change in pull request #1584:
URL: https://github.com/apache/fineract/pull/1584#discussion_r563168576



##########
File path: kubernetes/fineract-server-deployment.yml
##########
@@ -54,6 +54,10 @@ spec:
         app: fineract-server
         tier: backend
     spec:
+      initContainers:
+        - name: init-mydb
+          image: busybox:1.28
+          command: ['sh', '-c', 'echo -e "Checking for the availability of 
MYSQL server deployment"; while ! nc -z "fineractmysql" 3306; do sleep 1; 
printf "-"; done; echo -e " >> MYSQL server has started";']

Review comment:
       > Simply the idea here is to verify that mysql server is running 
properly on the correct port and then FINERACT server could properly connect to 
mysql server and do the required tasks. Otherwise if we get a problem with 
mysql server, fineract server will go in to a CrashLoopBackOff state which is 
unnecessary.
   
   > we need to just check whether the MYSQL server (remote server) is up and 
running. 
   
   Understod, and I think that's a great idea!
   
   > By using busybox image we can achieve that easily (from the bash command). 
   
   `nc` just makes sure there's a connection on the port. 
   
   `mysqladmin ping` may do more? I' haven't checked. It should make sure 
server is really up. 
   
   `mysqladmin status` maybe better.
   
   > mysql:5.7 image will need some extra configurations to establish the 
connection and listen to a remote server.(setting up credentials etc.. which is 
unnecessary) 
   
   It shouldn't, hopefully just `-h fineractmysql` should suffice? (But I 
haven't tested it myself.)
   
   But you know how the saying "done is better than perfect"? 
   
   I'll merge this anyway, and leave it up to you if you want to improve it in 
a follow-up PR, or leave it as is, that's fine too; it's not super important.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to