Closed jakub-bochenski closed 1 year ago
Hello @jakub-bochenski,
There is a slight difference between the options.
If you use the TYK_GW_POLICIES_POLICYPATH
option then you are asking the gateway to load a list of policies from a directory. This also allows you to manage those policies via the gateway REST API. That is why the operator uses it.
The TYK_GW_POLICIES_POLICYRECORDNAME
will allow you to specify a single file that contains all your policy definitions and will only be used if the TYK_GW_POLICIES_POLICYPATH
is empty.
Here is the code reference. I hope this answer helps :)
Well then the docs quotde above are wrong. I now know the difference but maybe you would want to update them?
it should be some existing file path on hard drive
I will put in a PR shortly and link it here :) Thank you @jakub-bochenski!
Those 2 settings seem to cover the same thing. I've been using the
policies.policy_record_name
successfully.What is the other setting supposed to do?
Another mystery is why the official helm chart is setting TYK_GW_POLICIES_POLICYPATH to be a directory and not a file
When TYK_GW_POLICIES_POLICYPATH is set to point to a directory Tyk loads a single unnamed empty policy.