Open pepov opened 5 years ago
Ran into this as well - is anyone else also experiencing this?
This is broader than just volumes
/volumeMounts
. It affects imagePullSecrets
in https://github.com/konpyutaika/nifikop
I ran into a same problem, any ways to solve it?
Description of the problem
When matching pods (and possibly other types of objects) a typical issue is that the patch will contain unnecessary
$setElementOrder
directives, most probably caused by the automatically generated Volumes and VolumeMounts of the service account token.Current mitigation
Right now this is mitigated by actually applying the patch locally and checking it against the current version to see if it is a false positive or not.
It is possibly a bug or a limitation in the package
k8s.io/apimachinery/pkg/util/strategicpatch
but would need more investigation to find out.How to reproduce
Remove the code responsible for double checking the patch and run the integration tests
go test -integration -v
to seepod matches with original
to fail with the following unwanted patch:The original pod spec: