-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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: Add persistence option to memcached on helm chart #13619
Conversation
not sure why |
ba6375d
to
c089234
Compare
@JStickler sorry to tag you directly but can I get a review here please? |
@AndreZiviani I'm the technical writer on the Loki team, not a developer. So I do not review code, just docs PRs. |
my bad, can you tag the correct person to review this please? |
86c208b
to
3e192c2
Compare
@vlad-diachenko @DylanGuedes sorry to tag you directly but could you take a look here please? thanks |
caac9c3
to
fd12ba3
Compare
{{- if .extraVolumeMounts }} | ||
volumeMounts: | ||
{{- if .persistence.enabled }} | ||
- name: data | ||
mountPath: {{ .persistence.mountPath }} | ||
{{- end }} | ||
{{- if .extraVolumeMounts }} | ||
{{- toYaml .extraVolumeMounts | nindent 12 }} | ||
{{- end }} |
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.
How does this behave when there are neither .extraVolumeMounts
and .persistence.enabled
is false
? I would assume it renders the key volumeMounts:
but without list items. I assume this would cause invalid YAML.
In that case, it should either not render volumeMounts
at all, or volumeMounts: []
.
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.
I would assume it renders the key volumeMounts: but without list items
that is correct
I assume this would cause invalid YAML.
that is not an issue, for exemple env is empty by default but I've added another check just in case
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.
Hm, interesting, I would expect that to be invalid. Nevertheless, thanks for the additional check.
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.
One other question I still have is:
Do we want to set the --extended
CLI arguments on the memcached container that are required for using the extstore feature, if persistence is enabled?
I see that they could be set using the extraExtendedOptions
, but maybe it would be nice if you don't have to remember the the options.
Wdyt?
yeah... I thought about that, loki-distributed does something like that but that was an issue for me because that paremeter makes memcached use the disk for persistency which means that my performance was bound to disk speed and it is not possible to remove/disable it so I had to declare the volume outside of the helm chart. I used the persistency as a second tier (like swap) which makes the hot data fast but could store less frequently accessed data on disk, more details on the blog post. |
2831a1e
to
2959d56
Compare
I tried doing in a more flexible way but it became too complex, I believe how I did now is enough I also rebased the branch to fix the conflicts |
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.
lgtm
…a#13619) Add an option to configure persistence on memcached, very useful with extstore option. More info on Grafana Blog post (https://grafana.com/blog/2023/08/23/how-we-scaled-grafana-cloud-logs-memcached-cluster-to-50tb-and-improved-reliability/), based mostly on `loki-distributed` Helm chart.
What this PR does / why we need it:
Add an option to configure persistence on memcached, very useful with
extstore
option.More info on Grafana Blog post, based mostly on
loki-distributed
helm chartChecklist
CONTRIBUTING.md
guide (required)feat
PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.md
production/helm/loki/Chart.yaml
and updateproduction/helm/loki/CHANGELOG.md
andproduction/helm/loki/README.md
. Example PRdeprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR