readFileSync() Function
The readFileSync() function will read a local file in the jsPolicy container and return the contents as a string. If the file cannot be found undefined will be returned.
Example#
This example shows how you can directly access the Kubernetes API within a policy, without calling any of the predefined jsPolicy functions except readFileSync and fetchSync.