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

imagepolicy tag not qouted when tag contains dashes #713

Open
gailingmic opened this issue Jul 13, 2024 · 1 comment
Open

imagepolicy tag not qouted when tag contains dashes #713

gailingmic opened this issue Jul 13, 2024 · 1 comment

Comments

@gailingmic
Copy link

Helllo everyone,

when using the image-automation-controller it sets the tag like this for imagetags wich use dashes inside of the tags:

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
spec:
  values:
    image:
      repository: ghcr.io/homebridge/homebridge
      tag: 2024-06-27 # {"$imagepolicy": "flux-system:homebridge:tag"}

the issue with that is that somewhere down the line it gets interpreted as a dateformat wich means k8s fails to apply the imagetag

Failed to apply default image tag "ghcr.io/homebridge/homebridge:2024-06-27T00:00:00Z": couldn't parse image name "ghcr.io/homebridge/homebridge:2024-06-27T00:00:00Z": invalid reference format

i think the best fix would be to always qoute the tag as its always of type string.

Sincerely,
Michell

@kingdonb
Copy link
Member

kingdonb commented Jul 24, 2024

There was some follow-up in the thread, but I'm not sure if you saw it:

https://cloud-native.slack.com/archives/CLAJ40HV3/p1720906838014349

skipping to the exciting conclusion ... according to our testing, if the 2024-06-27 Date is quoted in the source file, ahead of ImageUpdateAutomation firing, then it will still be quoted after ImageUpdateAutomation runs. Have you tried simply quoting the date in your source YAML, like this, then letting the ImageUpdateAutomation reconcile again?

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
spec:
  values:
    image:
      repository: ghcr.io/homebridge/homebridge
      tag: "2024-06-27" # {"$imagepolicy": "flux-system:homebridge:tag"}

I'm very sorry that I didn't think of this, you probably gave up after 96 messages back and forth, but frankly I didn't think that would work. (Well @darkowlzz tried it and said it did work.)

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

No branches or pull requests

2 participants