configmap-reload icon indicating copy to clipboard operation
configmap-reload copied to clipboard

Hostpath Mount not working

Open whitepiratebaku opened this issue 2 years ago • 6 comments

Hello, is it supposed to work with HostPath mount from node? because it does not seem to work.

whitepiratebaku avatar Oct 11 '22 06:10 whitepiratebaku

Hmm that's an interesting one. This will not work because the strategy expects the volume to be mounted in the way that a configmap (or secret) is mounted (see https://github.com/jimmidyson/configmap-reload/blob/main/configmap-reload.go#L183).

jimmidyson avatar Oct 11 '22 08:10 jimmidyson

Yeah, thank you

whitepiratebaku avatar Oct 11 '22 09:10 whitepiratebaku

@jimmidyson ok, but what is the reason behind this restriction to "..data" ? Wouldn't it simply work with all kind of data sources ( persistent volumes , etc.) if we skip this restriction?

alitari avatar Mar 12 '23 11:03 alitari

Originally this was only for configmaps, which work with this ..data strategy, and I can't remember the reason why I enforced this restriction :sweat_smile:

jimmidyson avatar Mar 13 '23 11:03 jimmidyson

Thinking about this, the inotify notification required would be different for a hostpath volume or persistentvolume mount, in that what are we watching: the mounted directory, or content in the mounted directory? For configmaps, watching ..data only makes sense as the directory symlink is updated which makes what we're watching much easier. To have more generic support, we would need to think about what we do support and what the UX would be.

jimmidyson avatar Mar 13 '23 11:03 jimmidyson

i understand, thx for the explanation :+1:

alitari avatar Mar 13 '23 11:03 alitari