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

chore(helm): set Singlebinary as trigger for replicas #12590

Merged
merged 4 commits into from
Apr 20, 2024
Merged

chore(helm): set Singlebinary as trigger for replicas #12590

merged 4 commits into from
Apr 20, 2024

Conversation

nohant
Copy link
Contributor

@nohant nohant commented Apr 12, 2024

What this PR does / why we need it:
this will make the singlebinary chart option working again by setting to 0 the replicas number of backend, write,read

Special notes for your reviewer:
Thanks @DylanGuedes for the explanation on slack

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@nohant nohant requested a review from a team as a code owner April 12, 2024 10:59
@CLAassistant
Copy link

CLAassistant commented Apr 12, 2024

CLA assistant check
All committers have signed the CLA.

@nohant
Copy link
Contributor Author

nohant commented Apr 12, 2024

i was disabling the various components by default by doing this:

{{- if ne .Values.deploymentMode "SingleBinary" }}
{{- include "loki.memcached.statefulSet" (dict "ctx" $ "valuesSection" "resultsCache" "component" "results-cache" ) }}
{{- end }}

but then i noticed that a better solution would be to put enabled: false as default for those components:

  • resultsCache:
  • chunksCache:

i don't know if it is correct that i set them to disabled by default, because i don't honestly know if i have to work on the documentation later.

Copy link
Contributor

@DylanGuedes DylanGuedes left a comment

Choose a reason for hiding this comment

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

lgtm. it is out-of-date with main though, could you update it?

this will make the singlebinary chart option working again by setting to 0 the replicas number of backend, write,read
@nohant
Copy link
Contributor Author

nohant commented Apr 19, 2024

@DylanGuedes Thanks, i cant merge so i will wait for someone to do that.
i force pushed the updated docs and changelog.

@DylanGuedes
Copy link
Contributor

@DylanGuedes Thanks, i cant merge so i will wait for someone to do that. i force pushed the updated docs and changelog.

it is still conflicting, not sure if it was someone merging something earlier today or your rebase didn't catch everything but could you update it again?

@nohant
Copy link
Contributor Author

nohant commented Apr 20, 2024

@DylanGuedes Thanks, i cant merge so i will wait for someone to do that. i force pushed the updated docs and changelog.

it is still conflicting, not sure if it was someone merging something earlier today or your rebase didn't catch everything but could you update it again?

it got like 4 merges xD i will do that again, yeah

@DylanGuedes DylanGuedes merged commit 6d307e5 into grafana:main Apr 20, 2024
15 of 16 checks passed
@danports
Copy link

If the intent here was to eliminate the verbose chart configuration required for SingleBinary mode:

backend:
  replicas: 0
read:
  replicas: 0
write:
  replicas: 0
ingester:
  replicas: 0
querier:
  replicas: 0
queryFrontend:
  replicas: 0
queryScheduler:
  replicas: 0
distributor:
  replicas: 0
compactor:
  replicas: 0
indexGateway:
  replicas: 0
bloomCompactor:
  replicas: 0
bloomGateway:
  replicas: 0

...then I don't think this works as intended: Helm upgrade failed for release monitoring/loki with chart loki@6.3.3: execution error at (loki/templates/validate.yaml:31:4): You have more than zero replicas configured for both the single binary and simple scalable targets. If this was intentional change the deploymentMode to the transitional 'SingleBinary<->SimpleScalable' mode

@nohant
Copy link
Contributor Author

nohant commented Apr 22, 2024

Hi @danports, in the version of the chart 6.2.0 which is where i started, this was enough to make the singlebinary work:

write:
  replicas: 0
read:
  replicas: 0
backend:
  replicas: 0

im gonna look into this asap, sorry if you are facing problems!

@DylanGuedes
Copy link
Contributor

If the intent here was to eliminate the verbose chart configuration required for SingleBinary mode:

backend:
  replicas: 0
read:
  replicas: 0
write:
  replicas: 0
ingester:
  replicas: 0
querier:
  replicas: 0
queryFrontend:
  replicas: 0
queryScheduler:
  replicas: 0
distributor:
  replicas: 0
compactor:
  replicas: 0
indexGateway:
  replicas: 0
bloomCompactor:
  replicas: 0
bloomGateway:
  replicas: 0

...then I don't think this works as intended: Helm upgrade failed for release monitoring/loki with chart loki@6.3.3: execution error at (loki/templates/validate.yaml:31:4): You have more than zero replicas configured for both the single binary and simple scalable targets. If this was intentional change the deploymentMode to the transitional 'SingleBinary<->SimpleScalable' mode

could you share your full config?

@nohant
Copy link
Contributor Author

nohant commented Apr 22, 2024

@DylanGuedes im testing the same, effectively, there is something that overwrite my configuration but i still havent found where, do you have any idea?

@DylanGuedes
Copy link
Contributor

@DylanGuedes im testing the same, effectively, there is something that overwrite my configuration but i still havent found where, do you have any idea?

Not sure, sorry 😢

Since this didn't have the intended effect, do you mind opening a PR reverting it?

@nohant
Copy link
Contributor Author

nohant commented Apr 22, 2024

yep, im thinking about how to do that. :V
its just a normal PR like this one?

@nohant
Copy link
Contributor Author

nohant commented Apr 22, 2024

Found why.
im gonna open a new pr. the problem is in the template:

{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}}
{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }}

it filters for those before ever going to check for replicas
@DylanGuedes gimme some time and i will fix it

@DylanGuedes
Copy link
Contributor

DylanGuedes commented Apr 22, 2024

Found why. im gonna open a new pr. the problem is in the template:

{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}}
{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }}

it filters for those before ever going to check for replicas @DylanGuedes gimme some time and i will fix it

let's first revert this PR to stop the bleed.

yep, im thinking about how to do that. :V its just a normal PR like this one?

git revert commithash should do it

@nohant
Copy link
Contributor Author

nohant commented Apr 22, 2024

@DylanGuedes technically this doesnt change anything from before, my edits gets ignored the same as before i made them :/ i reverted the in the new pr (i tagged you).
if you think we need to fix this fast for other reason i will do that, but i think it will be more useful to continue on the other side.

Thanks!
Greg

@danports
Copy link

To be clear, nothing is actually broken in my install due to this PR - it's just that the PR description gave me false hope that I could remove all of the redundant replicas: 0 bits from my configuration. I left those bits in for now and the chart is still working fine.

@DylanGuedes
Copy link
Contributor

To be clear, nothing is actually broken in my install due to this PR - it's just that the PR description gave me false hope that I could remove all of the redundant replicas: 0 bits from my configuration. I left those bits in for now and the chart is still working fine.

Oh that's good to know. Yes, by your comment I thought that this could be breaking existing installations somehow 😅

@nohant don't worry about reverting it then.

@nohant
Copy link
Contributor Author

nohant commented Apr 22, 2024

no, @DylanGuedes it does not breaks anything because it gets ignored sadly :V, i missed the part i explained before but i should have fixed it in the next PR (sorry by the double) also @danports can you check that? a double check is better than one xD

@thorker
Copy link
Contributor

thorker commented Apr 29, 2024

Can you please fix the copy & paste issue referencing {{.Values.write.replicas}} in read & backend

@nohant
Copy link
Contributor Author

nohant commented May 3, 2024

iv resolved it here: https://github.com/grafana/loki/pull/12727/files, while also resolving the problem that it didnt counted for replicas at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants