diun icon indicating copy to clipboard operation
diun copied to clipboard

Option to set `watch_repo` globally

Open markhaehnel opened this issue 3 years ago • 6 comments

Is there a way to set watch_repo and the corresponding options like max_tags, include_tags and exclude_tags globally or per provider?

The use case for this would be that I want to check all running images (which have precise tags) for new tags, not just updated images.

If not, can you give me info where and how one could implement this in diun and if it would be a beginner friendly pull request? I would be happy to contribute.

markhaehnel avatar Sep 21 '21 07:09 markhaehnel

this is an interesting bit - I am looking for the same thing to be able to deploy diun on a set of servers that use docker-compose to host containers with repeatable deployments and specific image versions. having watchrepo as a global setting would allow to deploy a diun pod next to the other docker containers without having to change their docker-compose files.

christf avatar Oct 06 '21 14:10 christf

We can add a watch.override opt:

watch:
  override:
    watch_repo: true
    notify_on: update
    max_tags: 100
    include_tags:
      - ...
    exclude_tags:
      - ...

crazy-max avatar Dec 12 '21 23:12 crazy-max

That's sounds like a very flexible and solid solution.

markhaehnel avatar Dec 14 '21 13:12 markhaehnel

watch.defaults might be a better naming actually.

crazy-max avatar Dec 14 '21 15:12 crazy-max

I have the same scenario: I avoid using latest but instead use the last specific tagged version but I would like to be notified when latest changes so I can adjust the tag.

Currently I am adding this (Kubernetes provider):

      annotations:
        'diun.watch_repo': 'true'
        'diun.include_tags': 'latest;10.3'

where 10.3 is the fixed tag I have specified.

U1F984 avatar Dec 17 '21 14:12 U1F984

It would be super nice to see this feature! +1

zsiti avatar Jan 26 '22 00:01 zsiti

Defaults sounds better than Overrides unless the global is going to take precedent over values set at the image level.

IamTheFij avatar Jan 20 '23 17:01 IamTheFij