Skip to content
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

[helm] Si bytes calculation always floor fix #10044

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions operations/helm/charts/mimir-distributed/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Entries should include a reference to the Pull Request that introduced the chang
* [BUGFIX] Fix how `fullnameOverride` is reflected in generated manifests. #9564
* [BUGFIX] Fix `extraObjects` linting with helm lint by padding with an extra new line. #9863
* [BUGFIX] Alertmanager: Set -server.http-idle-timeout to avoid EOF errors in ruler, also for zone aware Alertmanager #9851
* [BUGFIX] Fix calculation of `mimir.siToBytes` and use floating point arithmetics, also multiply the memory request by 0.9 for store-gateway `GOMEMLIMIT` #10044
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* [BUGFIX] Fix calculation of `mimir.siToBytes` and use floating point arithmetics, also multiply the memory request by 0.9 for store-gateway `GOMEMLIMIT` #10044
* [BUGFIX] Fix calculation of `mimir.siToBytes` and use floating point arithmetics. Also, multiply the memory request by 0.9 for store-gateway `GOMEMLIMIT` #10044


## 5.5.1
* [BUGFIX] Fix incorrect use of topology spread constraints in `GrafanaAgent` CRD of metamonitoring. #9669
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -663,21 +663,21 @@ mimir.siToBytes takes 1 argument
*/}}
{{- define "mimir.siToBytes" -}}
{{- if (hasSuffix "Ki" .value) -}}
{{- trimSuffix "Ki" .value | float64 | mul 1024 | ceil | int64 -}}
{{- trimSuffix "Ki" .value | float64 | mulf 1024 | ceil | int64 -}}
{{- else if (hasSuffix "Mi" .value) -}}
{{- trimSuffix "Mi" .value | float64 | mul 1048576 | ceil | int64 -}}
{{- trimSuffix "Mi" .value | float64 | mulf 1048576 | ceil | int64 -}}
{{- else if (hasSuffix "Gi" .value) -}}
{{- trimSuffix "Gi" .value | float64 | mul 1073741824 | ceil | int64 -}}
{{- trimSuffix "Gi" .value | float64 | mulf 1073741824 | ceil | int64 -}}
{{- else if (hasSuffix "Ti" .value) -}}
{{- trimSuffix "Ti" .value | float64 | mul 1099511627776 | ceil | int64 -}}
{{- trimSuffix "Ti" .value | float64 | mulf 1099511627776 | ceil | int64 -}}
{{- else if (hasSuffix "k" .value) -}}
{{- trimSuffix "k" .value | float64 | mul 1000 | ceil | int64 -}}
{{- trimSuffix "k" .value | float64 | mulf 1000 | ceil | int64 -}}
{{- else if (hasSuffix "M" .value) -}}
{{- trimSuffix "M" .value | float64 | mul 1000000 | ceil | int64 -}}
{{- trimSuffix "M" .value | float64 | mulf 1000000 | ceil | int64 -}}
{{- else if (hasSuffix "G" .value) -}}
{{- trimSuffix "G" .value | float64 | mul 1000000000 | ceil | int64 -}}
{{- trimSuffix "G" .value | float64 | mulf 1000000000 | ceil | int64 -}}
{{- else if (hasSuffix "T" .value) -}}
{{- trimSuffix "T" .value | float64 | mul 1000000000000 | ceil | int64 -}}
{{- trimSuffix "T" .value | float64 | mulf 1000000000000 | ceil | int64 -}}
{{- else if (hasSuffix "m" .value) -}}
{{- trimSuffix "m" .value | float64 | mulf 0.001 | ceil | int64 -}}
{{- else -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ spec:
{{- end }}
{{- if $mem_request }}
- name: "GOMEMLIMIT"
value: {{include "mimir.siToBytes" (dict "value" $mem_request) | toString | toYaml }}
value: {{include "mimir.siToBytes" (dict "value" $mem_request) | mulf 0.9 | floor | int64 }}
{{- end }}
{{- if $jaeger_queue_size }}
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -297,7 +297,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -448,6 +448,6 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -279,7 +279,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -421,6 +421,6 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -269,7 +269,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -406,6 +406,6 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,6 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -269,7 +269,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -406,6 +406,6 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -269,7 +269,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -406,6 +406,6 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -269,7 +269,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -406,6 +406,6 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "6442450944"
value: 5798205849
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -301,7 +301,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "6442450944"
value: 5798205849
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -454,6 +454,6 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "6442450944"
value: 5798205849
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,6 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -273,7 +273,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -412,6 +412,6 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -271,7 +271,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -409,6 +409,6 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "1073741824"
value: 1449551462
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -301,7 +301,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "1073741824"
value: 1449551462
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -454,6 +454,6 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "1073741824"
value: 1449551462
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -279,7 +279,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -421,6 +421,6 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -263,7 +263,7 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
---
Expand Down Expand Up @@ -397,6 +397,6 @@ spec:
- name: "GOMAXPROCS"
value: "5"
- name: "GOMEMLIMIT"
value: "536870912"
value: 483183820
- name: "JAEGER_REPORTER_MAX_QUEUE_SIZE"
value: "1000"
Loading
Loading