Feature: Check if pods running
As a user, I want the script to check if a pod is running before continuing to the next command, ensuring that dependencies are fully initialized before proceeding. This will enhance the reliability and stability of the deployment process.
The script should include a check to verify if the required pod is running. If the pod is not running, the script should wait and periodically check the pod status. Once the pod is running, the script should continue with the next command. The script should log appropriate messages indicating the status of the pod and the actions being taken. Implement this check for each major component: Kubernetes, MySQL, PHP, Nginx, Apache, and CiviCRM.
Steps to Reproduce:
- Deploy the script in an environment.
- Observe the script's behavior when a pod is not immediately available.
- Ensure that the script waits for the pod to run before moving to the next command.
Additional Context:
- This feature is aimed at improving the deployment reliability of the Kubernetes setup for MySQL, PHP, Nginx, Apache, and CiviCRM.
- The current script sometimes proceeds with subsequent commands before the necessary pods are fully running, leading to intermittent failures.