Stores results from an API call which will be cached.
Mutually exclusive with KubernetesResource.
This can be used to make calls to external (non-Kubernetes API server) services.
It can also be used to make calls to the Kubernetes API server in such cases:
1. A POST is needed to create a resource.
2. Finer-grained control is needed. Example: To restrict the number of resources cached.
data
[]object
The data object specifies the POST data sent to the server.
Only applicable when the method field is set to POST.
key
string required
Key is a unique identifier for the data value
value
object required
Value is the data value
method
string
Method is the HTTP request type (GET or POST). Defaults to GET.
enum: GET, POST
refreshInterval
string
RefreshInterval defines the interval in duration at which to poll the APICall.
The duration is a sequence of decimal numbers, each with optional fraction and a unit suffix,
such as "300ms", "1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
format: duration
retryLimit
integer
RetryLimit defines the number of times the APICall should be retried in case of failure.
minimum: 1
service
object
Service is an API call to a JSON web service.
This is used for non-Kubernetes API server calls.
It's mutually exclusive with the URLPath field.
caBundle
string
CABundle is a PEM encoded CA bundle which will be used to validate
the server certificate.
headers
[]object
Headers is a list of optional HTTP headers to be included in the request.
key
string required
Key is the header key
value
string required
Value is the header value
url
string required
URL is the JSON web service URL. A typical form is
`https://{service}.{namespace}:{port}/{path}`.
urlPath
string
URLPath is the URL path to be used in the HTTP GET or POST request to the
Kubernetes API server (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments").
The format required is the same format used by the `kubectl get --raw` command.
See https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls
for details.
It's mutually exclusive with the Service field.