-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Invalid image ID on HelmRelease #2663
Comments
I wondered if this might be because the traefik tags are apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
name: filebeat
namespace: waives-system
annotations:
fluxcd.io/automated: "true"
fluxcd.io/tag.chart-image: semver:~7.4
# Tell Flux where to find the tag value
tag.fluxcd.io/traefik: imageTag
spec:
releaseName: filebeat
chart:
repository: https://helm.elastic.co
name: filebeat
version: 7.4.1
values:
image: docker.elastic.co/beats/filebeat
imageTag: 7.4.1 |
You're missing the repository and filter annotations https://docs.fluxcd.io/en/stable/references/helm-operator-integration.html#annotations |
Try this: apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
name: filebeat
namespace: waives-system
annotations:
filter.fluxcd.io/filebeat: semver:~7.4
tag.fluxcd.io/filebeat: imageTag
repository.fluxcd.io/filebeat: image
spec:
releaseName: filebeat
chart:
repository: https://helm.elastic.co
name: filebeat
version: 7.4.1
values:
image: docker.elastic.co/beats/filebeat
imageTag: 7.4.1 |
Thanks @stefanprodan, much appreciated. Good shout on the repository annotation; I'd missed tha tthis was required. I don't understand the relationship between the |
The changes @stefanprodan proposed have resolved the immediate issues, so many thanks for that. I still don't understand why this set worked and the previous one didn't, given the documentation here. |
I'm disappointed this was closed without addressing the documentation concerns I raised in my last comment. I've found Flux quite difficult to grasp so far, not least because I'm having to pull together information from 3-4 different (and somewhat sketchy) sources, with inconsistencies across them all. I still don't understand whether the annotations I'd initially used were valid but used incorrectly, or whether they were non-existent now (cf. with the references to the |
@alastairs Sorry, I thought your query was resolved. Your input is very valuable as a new user, since you are looking at Flux with fresh eyes (and ours are biased after working with Flux for a while). The tag/repository annotations indicate what image to update (and where to find it in the HelmRelease values) and the filter annotation indicates what registry images are considered as candidates for the update. You do need the
I didn't interpret those as concerns, my bad. I am sorry about your frustrating experience with the documentation. It can always be improved, of course! Regarding your disappointment, as you know this is a (rather understaffed) open source project, so, I would be really happy if you could channel that frustration/disappointment into documentation improvements so that the whole community wins as a result. Re-opening the issue until you are satisfied with the outcome, let me know. |
Also, |
Valid, but they didn't lead to the result you wanted |
Of course! I made a start earlier in the week with #2653 and am more than happy to contribute improvements when and where they’re clear. I’ll make some notes for a more substantial contribution—the main thing missing from a new user’s perspective is a “getting started” guide or similar, and I’m happy to add that when all the steps are straight in my head 😄 |
Have you taken a look at https://github.com/fluxcd/flux-get-started ? |
Yes, but this speaks to my points about pulling the information from multiple different sources of information 🙂 There's some information in the documentation, some in this GitHub repo, some in the repo you pointed out, and some in the helm-operator getting started repo too. |
Describe the bug
Flux incorrectly updates
HelmRelease
s when the tag is specified separately from the image, resulting in an invalid image ID error. I think also there's been a regression of the fix for #1290, or it wasn't fixed as I expected from reading that issue description.To Reproduce
HelmRelease
for a chart with animageTag
value, e.g.stable/traefik
orelastic/filebeat
. A sampleHelmRelease
is included belowimageTag
valueSample HelmRelease
Expected behavior
Flux overwrites the
imageTag
value with the new tag version. Instead, however, it overwrites theimage
value, appending the tag. This results in Helm attempting to deploy an image liketraefik:v1.7.19:v1.7
. Flux logs a message statingexpected image name as either <image>:<tag> or just <image>: invalid image ID
.Additional context
Add any other context about the problem here, e.g
The text was updated successfully, but these errors were encountered: