kubernetes-ingress
kubernetes-ingress copied to clipboard
Load OpenAPI files from ConfigMap
Is your feature request related to a problem? Please describe.
When reloading the configuration, or starting a Nginx IC pod, all external references must be present and responsive. This puts undesired dependencies on external systems.
There is a warning about that here:
Note: You need to make sure that the server where the resource files are located is always available when you are compiling your policy.
Describe the solution you'd like
It would be a better option to put the OpenAPI file in a ConfigMap (or a custom resource), and load it from there. Or (if it is not too big), include it directly in the APPolicy (ie base64 encoded).
Additional context
Right now OpenAPI spec is configured like this (source):
apiVersion: appprotect.f5.com/v1beta1
kind: APPolicy
spec:
policy:
open-api-files:
- link: http://${NAME}.aps-ap1841.svc.cluster.local/v3/api-docs