I am not sure if this is out of scope for helmfile, but what if we could have something like the following:
repositories:
- name: repo
url: xxx
context: xxx
releases:
- name: xxx
namespace: demo
chart: xxx
version: 0.1.0
values:
- foo:
image: bar/baz
tag: {{ bar/baz:~1.*.*-dev }}
Tag would then be interpolated to the latest version of bar/baz that satisfies the given constraint.
Our application image releases are decoupled from our chart releases, I was wondering if I could achieve a static chart version with a dynamic docker image version.
To add weaveworks/flux achieves something similar as follows:
apiVersion: flux.weave.works/v1beta1
kind: HelmRelease
metadata:
name: mongodb
namespace: demo
annotations:
flux.weave.works/automated: "false"
flux.weave.works/tag.chart-image: semver:~4.0 # this is the docker image version
spec:
releaseName: mongodb
chart:
repository: https://kubernetes-charts.storage.googleapis.com/
name: mongodb
version: 4.9.0
values:
image:
repository: bitnami/mongodb
tag: 4.0.3
usePassword: false
persistence:
enabled: false
securityContext:
enabled: true
fsGroup: 0
runAsUser: 0
https://github.com/weaveworks/flux-get-started/blob/master/releases/mongodb.yaml
I guess you could also use : https://github.com/philpep/imago
@michaelgeorgeattard Thanks for this!
I'm still considering how we could support this. But anyway - Although I like Flux, I was thinking that I would love automated PRs to update image tags even when I use GitOps + Flux.
I thought Flux was able to automatically push commits to update the image tag in Git, on a new docker image pushed to the docker registry. So probably it is just that we need to enhance Flux to submit a PR instead of pushing a commit?
@sgandon Thanks for the info! Just curious, but how imago helps here? Does it produce e.g. a YAML file containing pairs of a docker repo and the latest tag that conforms to the specified semver?
not really it check on the docker registry if there is a newer version that the one currently used and update the deployment with a more recent image if found. Actually I came across this project recently and did not try it yet. But intend to do so.
Got it. Thanks for clarifying!
Most helpful comment
not really it check on the docker registry if there is a newer version that the one currently used and update the deployment with a more recent image if found. Actually I came across this project recently and did not try it yet. But intend to do so.