Did you know ... Search Documentation:
Pack kubepl -- prolog/kubepl/kubepl.pl
PublicShow source

Check http://kubernetes.io API Reference document for details.

author
- Hongxin Liang
license
- Apache License Version 2.0
 initialize(+URI, +AuthOptions, +HTTPOptions, -Client) is semidet
 initialize(+URI, +Version, +AuthOptions, +HTTPOptions, -Client) is semidet
Initialize the client.
  • URI points to the API server for example https://example.com/api
  • Version indicates Kubernetes API version, for example v1; for endpoints not involving a specific API version, use initialize/4 instead
  • AuthOptions could be:
    • =auth(ssl, SSLOptions)=, refer to ssl:ssl_context/3 for available options
    • =auth(basic_auth, [user(User),password(Password)])=
    • =auth(bearer_token [token(Token)])=
  • Additional HTTP options (except =method, status_code, json_object=) can be passed to underlying http client
 get_resources(+Client, -Response)
Get available resources.
 partially_update(+Client, +Entity, +EntityConfig, +Params, +Body, +PatchType, -Response)
Partially update entities, for example =event, limit_range=, etc.

For entity who needs additional configuration, use EntityConfig, for example _{namespace:Namespace, name:Name, suffix:Suffix}; otherwise pass an empty dictionary. Suffix can be arbitrary atom including a slash-separated context for example some/context.

For all valid query parameters, please refer to Kubernetes API Reference document.

Body must be a valid dictionary according to the entity spec.

Valid PatchType is one of json, merge, or strategic-merge.

HTTP status code will be ignored becaise Kubernetes encodes whatever message in Response.

 proxy_head(+Client, +Entity, +EntityConfig, +Params, -Response)
Proxy HEAD request towards entities, for example =namespace, pods, services=, etc.

For entity who needs additional configuration, use EntityConfig, for example _{namespace:Namespace, name:Name, suffix:Suffix}; otherwise pass an empty dictionary. Suffix can be arbitrary atom including a slash-separated context for example some/context.

For all valid query parameters, please refer to Kubernetes API Reference document.

Body must be a valid dictionary according to the entity spec.

HTTP status code will be ignored becaise Kubernetes encodes whatever message in Response.

 proxy_options(+Client, +Entity, +EntityConfig, +Params, -Response)
Proxy OPTIONS request towards entities, for example =namespace, pods, services=, etc.

For entity who needs additional configuration, use EntityConfig, for example _{namespace:Namespace, name:Name, suffix:Suffix}; otherwise pass an empty dictionary. Suffix can be arbitrary atom including a slash-separated context for example some/context.

For all valid query parameters, please refer to Kubernetes API Reference document.

Body must be a valid dictionary according to the entity spec.

HTTP status code will be ignored becaise Kubernetes encodes whatever message in Response.

 initialize(+URI, +AuthOptions, +HTTPOptions, -Client) is semidet
 initialize(+URI, +Version, +AuthOptions, +HTTPOptions, -Client) is semidet
Initialize the client.
  • URI points to the API server for example https://example.com/api
  • Version indicates Kubernetes API version, for example v1; for endpoints not involving a specific API version, use initialize/4 instead
  • AuthOptions could be:
    • =auth(ssl, SSLOptions)=, refer to ssl:ssl_context/3 for available options
    • =auth(basic_auth, [user(User),password(Password)])=
    • =auth(bearer_token [token(Token)])=
  • Additional HTTP options (except =method, status_code, json_object=) can be passed to underlying http client

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 get(Arg1, Arg2, Arg3, Arg4, Arg5)
 get(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)
 delete(Arg1, Arg2, Arg3, Arg4, Arg5)
 delete(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)
 create(Arg1, Arg2, Arg3, Arg4, Arg5)
 create(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)
 update(Arg1, Arg2, Arg3, Arg4, Arg5)
 update(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)
 proxy_get(Arg1, Arg2, Arg3, Arg4, Arg5)
 proxy_get(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)
 proxy_delete(Arg1, Arg2, Arg3, Arg4, Arg5)
 proxy_delete(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)
 proxy_post(Arg1, Arg2, Arg3, Arg4, Arg5)
 proxy_post(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)
 proxy_put(Arg1, Arg2, Arg3, Arg4, Arg5)
 proxy_put(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)