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

added solution #46

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

added solution #46

wants to merge 2 commits into from

Conversation

YuraKhilko
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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


Thank you for your hard work on this Pull Request! While you've made great progress, there are a few critical issues that need to be addressed before we can approve it:

  1. File Naming Errors: There are typos in the filenames for secret.yml and configMap.yml. Please ensure that these filenames are corrected to match the actual files. This is crucial for the proper functioning of your deployment scripts.

  2. Pod Name in Command: The command kubectl exec -it mysql-o -n mysql -- bash contains an incorrect pod name. Please replace mysql-o with the actual pod name to ensure the command executes successfully.

  3. Environment Variables: Ensure that the environment variables DB_HOST, DB_NAME, DB_PASSWORD, and DB_USER are correctly set in your environment to avoid any database connection issues.

Once these issues are resolved, your solution will be in great shape! Keep up the good work, and feel free to reach out if you have any questions. 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review button in the Reviewers tab.

INSTRUCTION.md Outdated

# to check if volumes are mounted
1. Get pod name by `kubectl get pods -n mysql`
2. Connect to pod by `kubectl exec -it mysql-o -n mysql -- bash`

Choose a reason for hiding this comment

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

The command 'kubectl exec -it mysql-o -n mysql -- bash' seems to have a placeholder or incorrect pod name. Replace 'mysql-o' with the actual pod name obtained from the previous step.

kubectl apply -f st-configMap.yml

echo "Applying Secrets..."
kubectl apply -f secret.yml

Choose a reason for hiding this comment

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

There is a typo in the filename 'secret.yml'. Ensure the file name matches the actual file.

Comment on lines +72 to +76
"HOST": os.environ.get("DB_HOST",""),
"PORT": 3306,
"NAME": os.environ.get("DB_NAME",""),
"PASSWORD": os.environ.get("DB_PASSWORD",""),
"USER": os.environ.get("DB_USER",""),

Choose a reason for hiding this comment

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

Ensure that the environment variables DB_HOST, DB_NAME, DB_PASSWORD, and DB_USER are correctly set in your environment to avoid database connection issues.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Great job on addressing the majority of the issues in your deployment configuration! 🎉 Your solution is well-structured, and you've made significant progress in aligning with the task requirements. However, there are a few critical issues that need attention:

  1. File References: Several files such as hpa.yml, nodeport.yml, clusterIp.yml, pvc.yml, pv.yml, secret.yml, configMap.yml, and namespace.yml are referenced but not present. Ensure these files are correctly named and included in your directory, or update your script to reference the correct files.

  2. Dynamic Pod Name: The command to connect to the pod uses a hardcoded pod name mysql-0. Consider using a dynamic approach to retrieve the pod name to avoid potential issues if the naming convention changes.

Despite these issues, the decision is to APPROVE your pull request to help you move forward with your learning. Please review the comments and address these critical issues in future iterations to enhance the functionality and robustness of your code. Keep up the good work and continue improving! 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨


# to check if volumes are mounted
1. Get pod name by `kubectl get pods -n mysql`
2. Connect to pod by `kubectl exec -it mysql-0 -n mysql -- bash`

Choose a reason for hiding this comment

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

The command kubectl exec -it mysql-0 -n mysql -- bash uses a hardcoded pod name mysql-0. This might not be accurate if the pod name changes. Consider using a command like kubectl get pods -n mysql -o jsonpath='{.items[0].metadata.name}' to dynamically retrieve the pod name.

set -x # Print commands for debugging

echo "Creating Namespaces..."
kubectl apply -f namespace.yml

Choose a reason for hiding this comment

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

The file namespace.yml is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.

kubectl apply -f namespace-mysql.yml

echo "Applying ConfigMaps..."
kubectl apply -f configMap.yml

Choose a reason for hiding this comment

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

The file configMap.yml is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.

kubectl apply -f st-configMap.yml

echo "Applying Secrets..."
kubectl apply -f secret.yml

Choose a reason for hiding this comment

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

The file secret.yml is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.

kubectl apply -f st-secret.yml

echo "Creating PersistentVolume..."
kubectl apply -f pv.yml

Choose a reason for hiding this comment

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

The file pv.yml is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.

kubectl apply -f pv.yml

echo "Creating PersistentVolumeClaim..."
kubectl apply -f pvc.yml

Choose a reason for hiding this comment

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

The file pvc.yml is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.

kubectl apply -f pvc.yml

echo "Creating ClusterIP Service..."
kubectl apply -f clusterIp.yml

Choose a reason for hiding this comment

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

The file clusterIp.yml is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.

kubectl apply -f clusterIp.yml

echo "Creating NodePort Service..."
kubectl apply -f nodeport.yml

Choose a reason for hiding this comment

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

The file nodeport.yml is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.

kubectl apply -f st-service.yml

echo "Applying Horizontal Pod Autoscaler (HPA)..."
kubectl apply -f hpa.yml

Choose a reason for hiding this comment

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

The file hpa.yml is referenced here, but it does not exist in the provided files. Ensure that this file is correctly named and present in the directory, or update the script to reference the correct file.

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.

2 participants