-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix: Generate secret key in initContainer instead of python code #8003
base: develop
Are you sure you want to change the base?
fix: Generate secret key in initContainer instead of python code #8003
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughA new feature has been added to the Changes
Assessment against linked issues
Poem
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Quality Gate passedIssues Measures |
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.
Actionable comments posted: 0
Outside diff range and nitpick comments (2)
helm-chart/templates/cvat_backend/server/deployment.yml (1)
119-133
: The implementation of the initContainer for secret key generation looks correct and aligns with the PR objectives.However, consider adding error handling or logging to ensure that the secret key generation process is traceable and debuggable.
helm-chart/values.yaml (1)
122-123
: The addition of theinitSecretKey
configuration with a default value offalse
is appropriate and provides flexibility for enabling this feature.Consider documenting this new configuration in the Helm chart's README to help users understand its purpose and how to enable it.
This PR adds a cvat.backend.initSecretKey.enabled flag, which enables an initContainer on the cvat-backend-server deployment. This replaces the need for the generate_secret_key function when deploying via Helm.
Motivation and context
This PR fixes #8002 by creating the
/home/django/keys/secret_key.py
file in an initContainer, which makes it unnecessary to create it from one of the backend Pods.How has this been tested?
This has only been tested on AKS by deploying it.
Checklist
develop
branch[ ] I have increased versions of npm packages if it is necessary(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit
initSecretKey
to enable or disable secret key generation.