Reloader icon indicating copy to clipboard operation
Reloader copied to clipboard

[ENHANCE] Allow to use auto annotation with specific resource type (configmap or secret)

Open kichel98 opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. I am incorporating Reloader into my project mainly to automatically reload pods after certificates (secrets) change. For most deployments I do not want to allow reloading when configmaps change. But I would prefer not to forbid using Reloader for configmaps changes by setting ignoreConfigMaps globally (sometimes configmap reload might be used in my case). In this situation I need to use secret.reloader.stakater.com/reload: "<secret-list>" and maintain the <secret-list>. It would be much easier if I could use auto annotation for a given deployment/statefulset/daemonset but only for secrets.

Describe the solution you'd like Please enhance auto annotation and in addition to reloader.stakater.com/auto: "true" allow more specific annotations which allow to filter watched resources by resource type: configmap.reloader.stakater.com/auto: "true" and secret.reloader.stakater.com/auto: "true". E.g. using secret.reloader.stakater.com/auto: "true" will lead to the same behaviour as reloader.stakater.com/auto: "true" but only for mounted secrets, ignoring configmaps.

If you see other options to achieve what I need, please share.

kichel98 avatar Dec 06 '23 08:12 kichel98

@kichel98 if you'd like to submit a pull request for this change, we welcome the change

MuneebAijaz avatar Dec 13 '23 09:12 MuneebAijaz

@MuneebAijaz Here it is: https://github.com/stakater/Reloader/pull/604 😄

kichel98 avatar Jan 19 '24 15:01 kichel98

+1

pikopl avatar Jan 22 '24 14:01 pikopl

closing in favour of https://github.com/stakater/Reloader/pull/604

MuneebAijaz avatar Apr 08 '24 07:04 MuneebAijaz