wave icon indicating copy to clipboard operation
wave copied to clipboard

BinaryData not considered when hashing configmap

Open MikeSchlosser16 opened this issue 6 years ago • 5 comments

It looks like https://github.com/pusher/wave/blob/8bddd32d9aa5afcfb1b733df6e9ba520e0689ed4/pkg/core/hash.go#L71 only accounts for Data and not BinaryData. When changing my configmap with BinaryData the hash was always the same and thus the updates not rolled out properly. Logs showed that the hash was updated but it happened to be the same value, so otherwise potentially changing https://github.com/pusher/wave/blob/217c9b8e0797131edbed580aa489db994e4cce45/pkg/core/handler.go#L109 to make this more obvious if there is a reason to not use binaryData would make it more obvious.

If this sounds reasonable I can work on adding a fix.

Thanks!

MikeSchlosser16 avatar Jan 14 '20 19:01 MikeSchlosser16

Kubectl utils has functions for hashing ConfigMaps and Secrets and includes BinaryData

https://github.com/kubernetes/kubernetes/blob/7aa214d2c3f78598238c761099dacd6ead3d6fcd/staging/src/k8s.io/kubectl/pkg/util/hash/hash.go#L29

mcristina422 avatar Jan 14 '20 19:01 mcristina422

This issue has been inactive for 60 days. If the issue is still relevant please comment to re-activate the issue. If no action is taken within 7 days, the issue will be marked closed.

github-actions[bot] avatar Jan 19 '21 01:01 github-actions[bot]

This is still relevant

wonderhoss avatar Jan 19 '21 09:01 wonderhoss

~This issue has been inactive for 60 days. If the issue is still relevant please comment to re-activate the issue. If no action is taken within 7 days, the issue will be marked closed.~

github-actions[bot] avatar May 03 '21 00:05 github-actions[bot]

This issue has been inactive for 60 days. If the issue is still relevant please comment to re-activate the issue. If no action is taken within 7 days, the issue will be marked closed.

github-actions[bot] avatar Jul 03 '21 00:07 github-actions[bot]