fluxcd / flux

Successor: https://github.com/fluxcd/flux2
https://fluxcd.io
Apache License 2.0
6.9k stars 1.08k forks source link

flux v1 doesn't do image automation on image defined in Job #3128

Closed ghost closed 3 years ago

ghost commented 4 years ago

I have a helm chart with 3 Deployments and 1 Job. Flux is able to poll for the new tags on the 3 images used in the Deployments, but it's unable to authenticate to poll for the image in the Job.

All 4 images are stored in the same docker hub account with the same access permissions (accessible by the same imagePullSecret). The actual deployment (via helm-operator) works fine, thus the imagePullSecret is valid, but flux isn't using the key to scan that image.

Any suggestions?

ts=2020-06-10T20:29:53.402226852Z caller=warming.go:180 component=warmer canonical_name=index.docker.io/xxx/xxx auth={map[]} err="requesting tags: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n"

ts=2020-06-10T20:30:04.594671464Z caller=images.go:17 component=sync-loop msg="polling for new images for automated workloads"

ts=2020-06-10T20:30:04.682084355Z caller=images.go:159 component=sync-loop err="fetching image metadata for index.docker.io/xxx/xxx: item not in cache, last error: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n"
ghost commented 4 years ago

Looking into this more it seems like flux doesn't support Jobs at all. I can understand why, however I'm using a Job within Helm which handles the upgrade hook. Are there plans to allow flux to automate image tags within Jobs within a HelmRelease?

kingdonb commented 3 years ago

Flux v1 had support for limited Kubernetes object types, basically Deployment and HelmRelease from helm operator.

Flux v2 supports not only an extended set of Kubernetes' built-in primitives like Job, but also arbitrary custom resources in the new Image Automation: https://toolkit.fluxcd.io/guides/image-update/#configure-image-update-for-custom-resources

We hope you will be able to upgrade to take advantage of this new feature, and now that v2 is at the Feature Parity milestone, all Flux v1 users are being encouraged to upgrade as soon as possible. Flux v2 is a total rewrite from the ground up, the team is very excited about this milestone, and it brings many major quality of life improvements for Flux users.

Thanks for the report. Closing as this will not be resolved in Flux v1.