-
Notifications
You must be signed in to change notification settings - Fork 42
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
base: main
Are you sure you want to change the base?
Solution #38
Conversation
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.
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.
.infrastructure/deployment.yml
Outdated
@@ -29,7 +29,15 @@ spec: | |||
cpu: "150m" | |||
env: | |||
- name: PYTHONUNBUFFERED | |||
value: "1" | |||
valueFrom: | |||
configMapkeyRef: |
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 is a typo here: configMapkeyRef
should be configMapKeyRef
. This typo will prevent the environment variable from being correctly set from the ConfigMap.
.infrastructure/secret.yml
Outdated
@@ -0,0 +1,8 @@ | |||
apiVesrion: v1 |
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 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 |
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.
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.
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.
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:
-
DEBUG Setting: The
DEBUG
setting insettings.py
is still set toTrue
. For production environments, it should be set toFalse
to ensure security and prevent the exposure of sensitive information. -
Namespace Consistency: There is a namespace inconsistency across your Kubernetes manifest files. The
namespace
insecret.yml
andconfigMap.yml
is set tomateapp
, but thedeployment.yml
file uses thetodoapp
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 |
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.
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.
No description provided.