-
Notifications
You must be signed in to change notification settings - Fork 52
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
feat: handle correctly when replicas is set to 0 #259
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThis change enhances the Helm template logic for Authelia by addressing the handling of replicas. Previously, when no specific value was set, the default was Changes
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 Configuration File (
|
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- charts/authelia/templates/_helpers.tpl (1 hunks)
Additional comments not posted (1)
charts/authelia/templates/_helpers.tpl (1)
285-291
: Improvement in handling replicas set to 0.The logic correctly addresses the issue with Helm's interpretation of replicas set to 0. This ensures that a user-defined value of 0 is respected, aligning with the PR objectives.
Verify if the
authelia.replicas
helper function is used correctly throughout the Helm chart templates.Verification successful
Correct usage of
authelia.replicas
helper function found.The
authelia.replicas
helper function is correctly used in thedeployment.yaml
template, ensuring that the logic for handling replicas set to 0 is applied as intended.
- Location:
charts/authelia/templates/deployment.yaml
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the `authelia.replicas` helper function in the Helm chart. # Test: Search for the function usage. Expect: Correct usage in templates. rg --type yaml $'{{ include "authelia.replicas" . }}'Length of output: 165
Script:
#!/bin/bash # Description: Verify the usage of the `authelia.replicas` helper function in the Helm chart. # Test: Search for the function usage. Expect: Correct usage in templates. rg --type yaml '\{\{ include "authelia.replicas" . \}\}'Length of output: 148
Is there a particular use case for 0 replicas? |
I have deployed on application that is very occasionally used in my cluster and the app is used with Authelia. I configured sablier (https://github.com/acouvreur/sablier) on the app and it works well, I wanted to add Authelia with it but I have to configure replicas to 0 because sablier needs to manage it |
Hello !
I need to set replicas to 0 for my Authelia deployment but there is an issue with the interpretation of
0
with default. it's a known issue with helm so I added this simple workaround.Thanks for your work!