Skip to content

[ENHANCE] Allow match by dynamic, workload specific label #1196

Description

@Cenness

Is your feature request related to a problem? Please describe.
I use both kiwigrid/k8s-sidecar and reloader for an app. Sidecar is in init container, preparing bunch of files. Sidecar selects them by label plugins: appname. Target app doesn't have reload method so it must be done at initialisation.

Configs aren't referenced directly in app deployment so reloader doesn't know they are related. To bypass it in current version I therefore must add configmap.reloader.stakater.com/reload: "app-config-1" for each existing configmap.

Describe the solution you'd like
Reloader already have capability to watch for a specific label. I propose allowing that label be dynamic and workload specific. Or alternatively this could be seen as extending "Targeted Reload (Match + Search Annotations)" scenario.

Workload annotation reloader.stakater.com/search: "plugins=appname"
Secret/ConfigMap label: plugins: appname

Describe alternatives you've considered
Add another sidecar that kills target process annotates deployment.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions