-
Notifications
You must be signed in to change notification settings - Fork 72
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
Image tag marker doesn't work in top-level yaml array #624
Comments
Image automation only works for YAML files which start with |
Hey @stefanprodan Maybe it's unexpected then but it does actually work for generic YAML files too. serviceName: busybox
containerName: busybox
tag: 0.0.1 # {"$imagepolicy":"flux-system:busybox:tag"} So it's not a k8s resource but works just fine. |
@antonosmond I think there is an incidental case, perhaps we can say it happens to recognise resources that have an object at root, perhaps |
I agree. I didn't come up with that format but it's something I can change anyway so gonna change it. Just raised the issue in case it was something that would be expected to work. |
That's why my # kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../base
patches:
- path: patch-image.yaml
target:
kind: HelmRelease
name: nginx
# patch-image.yaml
- op: replace
path: /spec/values/containers/0/image # {"$imagepolicy": "flux-system:nginx-staging"}
value: nginx:alpine |
I was trying to use the image update automation to update a tag in a generic YAML file in git.
I found it doesn't update the image tag in the YAML if the YAML file has a top-level array.
A file like this doesn't work i.e. the image automation never updates the tag:
But this works:
And this also works:
I'm not sure what versions of flux this applies to but I'm using:
And the image automation controller tag is:
The text was updated successfully, but these errors were encountered: