-
Notifications
You must be signed in to change notification settings - Fork 544
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
mimir-distributed: allow components to override their container image #10340
Conversation
a650f8a
to
d559783
Compare
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.
can you also include the keys in the values.yaml? Since we still want to use the top-level image
, then you can make the new <component>.image
be a comment. Something like the TSC examples
mimir/operations/helm/charts/mimir-distributed/values.yaml
Lines 873 to 883 in fc8af05
# -- topologySpreadConstraints allows to customize the default topologySpreadConstraints. This can be either a single dict as shown below or a slice of topologySpreadConstraints. | |
# labelSelector is taken from the constraint itself (if it exists) or is generated by the chart using the same selectors as for services. | |
topologySpreadConstraints: | |
maxSkew: 1 | |
topologyKey: kubernetes.io/hostname | |
whenUnsatisfiable: ScheduleAnyway | |
# minDomains: 1 | |
# nodeAffinityPolicy: Honor | |
# nodeTaintsPolicy: Honor | |
# matchLabelKeys: | |
# - pod-template-hash |
that's basically the only documentation we have of helm chart features (plus the changelog, which is barely documentation)
@@ -30,6 +30,7 @@ Entries should include a reference to the Pull Request that introduced the chang | |||
## main / unreleased | |||
|
|||
* [CHANGE] Memcached: Update to Memcached 1.6.34. #10318 | |||
* [ENHANCEMENT] Add support for individual components to override their container image. #10340 |
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've been trying to make the changelog enough for anyone to get the gist of a change and know how to use it. Can you give an example of overriding the image for a component? Something like ingester.image.tag
and ingester.image.repository
. Or explain that there's an image
object under all component objects now
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've rephrased the entry with more details about the change.
operations/helm/charts/mimir-distributed/templates/_helpers.tpl
Outdated
Show resolved
Hide resolved
Signed-off-by: Vladimir Varankin <[email protected]>
Signed-off-by: Vladimir Varankin <[email protected]>
Signed-off-by: Vladimir Varankin <[email protected]>
Signed-off-by: Vladimir Varankin <[email protected]>
Signed-off-by: Vladimir Varankin <[email protected]>
Signed-off-by: Vladimir Varankin <[email protected]>
Signed-off-by: Vladimir Varankin <[email protected]>
089ca5e
to
0760e24
Compare
🆙 I've addressed the comments. PHAL |
Signed-off-by: Vladimir Varankin <[email protected]>
Signed-off-by: Vladimir Varankin <[email protected]>
Signed-off-by: Vladimir Varankin <[email protected]>
@@ -83,7 +83,7 @@ function generate_manifests() { | |||
helm template "${ARGS[@]}" 1>/dev/null | |||
cp -r "${INTERMEDIATE_OUTPUT_DIR}" "${OUTPUT_DIR}" | |||
rm "${OUTPUT_DIR}/${CHART_NAME}/templates/values-for-rego-tests.yaml" | |||
find "${OUTPUT_DIR}/${CHART_NAME}/templates" -type f -print0 | xargs -0 "${SED}" -E -i -- "/^\s+(checksum\/(alertmanager-fallback-)?config|(helm.sh\/)?chart|app.kubernetes.io\/version|image: \"grafana\/(mimir|mimir-continuous-test|enterprise-metrics)):/d" | |||
find "${OUTPUT_DIR}/${CHART_NAME}/templates" -type f -print0 | xargs -0 "${SED}" -E -i -- "/^\s+(checksum\/(alertmanager-fallback-)?config|(helm.sh\/)?chart|app.kubernetes.io\/version|image: \"?grafana\/(mimir|mimir-continuous-test|enterprise-metrics)):/d" |
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.
This one fixes the build script, so it looked for both quoted and non-quoted reference to the default image — both variants are valid to use in the YAML:
image: "grafana/mimir:
and
image: grafana/mimir:
(note the quote "
)
That is, we don't want the generated manifests to have the default image, so we didn't have to re-generate them everytime the default image changes (e.g. on every weekly release).
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.
values.yaml being the only interface to the chart and the primary source of docs, I try to keep them as explicit as possible. You could also mention that per-component settings exist in the docs for the image
and enterprise.image
sections.
But I don't need to see this again. Thanks!
@@ -551,6 +551,11 @@ alertmanager: | |||
# E.g. if 'replicas' is set to 4 and there are 3 zones, then 4/3=1.33 and after rounding up it means 2 pods per zone are started. | |||
replicas: 1 | |||
|
|||
# -- Allows to override the container image of the alertmanager component. |
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.
ok, i may be getting annoying, but can you mention that this takes precedence over the root-level image
and enterprise.image
sections?
# -- Allows to override the container image of the alertmanager component. | |
# -- Allows to override the container image of the alertmanager component from the root-level `image` and `enterprise.image` sections. |
something along those lines. You should be able to do a find-and-replace of the string.
Signed-off-by: Vladimir Varankin <[email protected]>
What this PR does
The PR updates the Helm chart to allow an individual component to override its container image reference via the component's local values. E.g.
The order in which the values take precedence is:
Which issue(s) this PR fixes or relates to
Fixes #10237
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.