Skip to content

feat(helm): add image registry value for memcached and memcached-exporter#16511

Closed
MagnusRef wants to merge 2 commits intografana:mainfrom
MagnusRef:memcached-set-registry
Closed

feat(helm): add image registry value for memcached and memcached-exporter#16511
MagnusRef wants to merge 2 commits intografana:mainfrom
MagnusRef:memcached-set-registry

Conversation

@MagnusRef
Copy link
Copy Markdown

What this PR does / why we need it:

Adds Docker image registry value for memcached and memcached-exporter. This is done to be able to specify custom registries for memcached and memcached-exporter.

Also adds some missing reference descriptions for memcached-exporter image values.

Which issue(s) this PR fixes:
Fixes #16197

Special notes for your reviewer:

First time contributing, so sorry if anything is missing. :)

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • 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

@MagnusRef MagnusRef requested a review from a team as a code owner February 28, 2025 22:37
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 28, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added area/helm type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories labels Feb 28, 2025
@jkroepke
Copy link
Copy Markdown
Contributor

Hi @MagnusRef,

thanks for your PR. It adds consistency to the Helm chart.

However, this is a potential breaking change.
Currently, users can set memcachedExporter.image.repository=internal.registry/memcached and define their own registry. With your change, this would break, because it would result in
image: docker.io/internal.registry/memcached

There are two possible solutions:

  1. Accept the breaking change and document it.

  2. Add a condition: if repository does not contain a ., then prefix with registry.

    image: {{ if not (contains "." .repository) }}{{ .registry }}/{{ end }}{{ .repository }}:{{ .tag }}
    
  3. Do nothing.

Before we discuss this internally, we need an activity signal from your side in the form of a PR rebase.

@MagnusRef
Copy link
Copy Markdown
Author

Hello @jkroepke

Yeah, this change is a little too small to warrant a breaking change IMO, so option two seems like a good solution.

However, would it make sense to standardize this logic across all of the other .image instances to keep things consistent?

@jkroepke
Copy link
Copy Markdown
Contributor

However, would it make sense to standardize this logic across all of the other .image instances to keep things consistent?

Should be great, but please start after

has been merged.

- name: memcached
{{- with $.ctx.Values.memcached.image }}
image: {{ .repository }}:{{ .tag }}
image: {{ .registry }}/{{ .repository }}:{{ .tag }}
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.

It would be great, if you can take care of backwards compatiblity. e.g. if repository contains dots, avoid prepend registry.

Ref: https://github.com/grafana/loki/pull/19347/files#diff-2296a17a0f4611b539d59e3c89cf6a8f53db863af266d6fdab2846d704c47b52R196-R213

I recommend to copy the logic first, and an additional PR could unify the image logic as you mentioned it already.

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.

I guess #19246 already implements a unified helper, which includes memcache as well.

@MagnusRef
Copy link
Copy Markdown
Author

Closing in favor of #19246

@MagnusRef MagnusRef closed this Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/helm size/M type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No registry entry for memcached and memcachedExporter in values.yaml file

3 participants