Skip to content

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

Closed
anotherglitchinthematrix wants to merge 6 commits into
grafana:mainfrom
anotherglitchinthematrix:patch-1
Closed

anotherglitchinthematrix wants to merge 6 commits into
grafana:mainfrom
anotherglitchinthematrix:patch-1

Conversation

@anotherglitchinthematrix

Copy link
Copy Markdown

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

CLAassistant commented Dec 21, 2023 •

Copy link
Copy Markdown

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

@zanhsieh zanhsieh left a comment

Copy link
Copy Markdown
Contributor

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
@zanhsieh

Copy link
Copy Markdown
Contributor

@jkroepke @Xtigyro
Can you review this?

@anotherglitchinthematrix

anotherglitchinthematrix commented Dec 30, 2024 •

Copy link
Copy Markdown
Author

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