This fixes an error when loading multiple policy files from a single config map.
kube-mgmt is sorting config map keys so it may happen that some files ( like a.rego ) is loaded before it's dependencies.
Since config map is not modified anymore - the policy is kept unloaded, although it's completely correct.
A simple retry is completely fixing the issue, since just another load may be successful because the dependencies (functions) were already loaded
This fixes an error when loading multiple policy files from a single config map.
kube-mgmt
is sorting config map keys so it may happen that some files ( likea.rego
) is loaded before it's dependencies. Since config map is not modified anymore - the policy is kept unloaded, although it's completely correct.A simple retry is completely fixing the issue, since just another load may be successful because the dependencies (functions) were already loaded