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

Solution #38

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

Solution #38

wants to merge 3 commits into from

Conversation

L1mbxbx
Copy link

@L1mbxbx L1mbxbx commented Dec 10, 2024

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! 😊 There are a few critical issues that need to be addressed before we can proceed. The typos in the apiVersion and configMapKeyRef fields are significant as they prevent Kubernetes from properly recognizing the Secret and setting the environment variable. Additionally, the DEBUG setting should be set to False for production to ensure security. Please make these changes, and feel free to reach out if you need any help! Once these are fixed, your solution will be in great shape. Keep up the great work! 🚀

✨ 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.

@@ -29,7 +29,15 @@ spec:
cpu: "150m"
env:
- name: PYTHONUNBUFFERED
value: "1"
valueFrom:
configMapkeyRef:

Choose a reason for hiding this comment

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

There is a typo here: configMapkeyRef should be configMapKeyRef. This typo will prevent the environment variable from being correctly set from the ConfigMap.

@@ -0,0 +1,8 @@
apiVesrion: v1

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 apiVersion field. It should be apiVersion instead of apiVesrion. This typo will prevent Kubernetes from recognizing the Secret properly.

@@ -18,7 +18,7 @@
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "@e2(yx)v&tgh3_s=0yja-i!dpebxsz^dg47x)-k&kq_3zf*9e*"
SECRET_KEY = os.getenv('SECRET_KEY')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

Choose a reason for hiding this comment

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

The DEBUG setting is set to True. This is fine for development, but it should be set to False in a production environment to avoid exposing sensitive information.

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 your progress! 🎉 While your Pull Request is approved to help you move forward with your learning, there are a few important issues to address:

  1. DEBUG Setting: The DEBUG setting in settings.py is still set to True. For production environments, it should be set to False to ensure security and prevent the exposure of sensitive information.

  2. Namespace Consistency: There is a namespace inconsistency across your Kubernetes manifest files. The namespace in secret.yml and configMap.yml is set to mateapp, but the deployment.yml file uses the todoapp namespace. Ensure that the namespaces are consistent across all files.

Please review these comments and make the necessary improvements to your code. Addressing these issues will enhance the security and functionality of your application. Keep up the good work and continue learning from these experiences! 🚀

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

@@ -18,7 +18,7 @@
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "@e2(yx)v&tgh3_s=0yja-i!dpebxsz^dg47x)-k&kq_3zf*9e*"
SECRET_KEY = os.getenv('SECRET_KEY')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

Choose a reason for hiding this comment

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

The DEBUG setting is currently set to True. For production environments, it should be set to False to ensure security and prevent the exposure of sensitive information.

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