Skip to content

[grafana] Enhance Deployment Template Flexibility for Zero Replicas #2866

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

Closed
wants to merge 6 commits into from
Closed

[grafana] Enhance Deployment Template Flexibility for Zero Replicas #2866

wants to merge 6 commits into from

Conversation

anotherglitchinthematrix

I've encountered an issue while attempting to deploy the Grafana chart with zero replicas. The problem arises from the replicas value being set to zero, which falsifies an if block in the deployment template, leading Kubernetes to default to a replication count of 1.

This pattern is not unique and is present in multiple deployment templates across the repository. The current implementation limits configuration options for manual intervention, restricting users from customizing the replication count as needed.

I suggest modifying this pattern in other deployment templates within the repository to improve consistency and provide users with greater flexibility in their configurations.

The current pattern undermines some configuration opportunities for manual intervention, hindering users from tailoring deployment settings according to their specific requirements.

Your feedback on these proposed changes is highly appreciated. Please share your thoughts on whether this modification aligns with our goals for configuration flexibility. Let's discuss the best approach to enhance the user experience in managing deployments.

@CLAassistant
Copy link

CLAassistant commented Dec 21, 2023

CLA assistant check
All committers have signed the CLA.

@zanhsieh zanhsieh changed the title Enhance Deployment Template Flexibility for Zero Replicas [grafana] Enhance Deployment Template Flexibility for Zero Replicas Jan 10, 2024
Signed-off-by: Ali Can YILDIZ <anotherglitchinthematrix@gmail.com>
Copy link
Contributor

@zanhsieh zanhsieh left a comment

Choose a reason for hiding this comment

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

@anotherglitchinthematrix
Can you bump the version in Chart.yaml and sign DCO please?

@zanhsieh zanhsieh requested a review from jkroepke as a code owner August 24, 2024 06:41
Signed-off-by: MH <zanhsieh@gmail.com>
Signed-off-by: MH <zanhsieh@gmail.com>
@zanhsieh
Copy link
Contributor

@jkroepke @Xtigyro
Can you review this?

@anotherglitchinthematrix
Copy link
Author

anotherglitchinthematrix commented Dec 30, 2024

This issue seems to be resolved in the recent versions after merging of #3337

This PR was fixing the falsy evaluation of the (.Values.replicas) when set to zero.

- {{- if and (not .Values.autoscaling.enabled) (.Values.replicas) }}
+ {{- if and (not .Values.autoscaling.enabled) (hasKey .Values "replicas") }}

The current conditional block eliminated that case.

{{- if (not .Values.autoscaling.enabled) }}

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.

4 participants