Skip to content

Commit

Permalink
api domain docs and some minor nearby cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mildwonkey committed Oct 29, 2024
1 parent 344636b commit 3ace518
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/reference/domains/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Domains, generically, are the areas or categories from which data is collected t

* Kubernetes
* API
* File

The domain block of a `Lula Validation` is given as follows, where the sample is indicating a Kubernetes domain is in use:
```yaml
Expand Down
41 changes: 40 additions & 1 deletion docs/reference/domains/api-domain.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
# API Domain

The API Domain allows for collection of data generically from API endpoints.
The API Domain allows for collection of data (via HTTP Get Requests) generically from API endpoints.

# Specification
The API domain Specification accepts a list of `Requests` and an `Options` block. `Options` can be configured at the top-level and will apply to all requests except those which have embedded `Options`. `Request`-level options will *override* top-level `Options`.


```yaml
domain:
type: api
api-spec:
# Options specified at this level will apply to all requests except those with an Options block of their own.
Options:
# Timeout configures the Request Timeout. Default is no timeout. The Timeout string is a number followed by a unit suffix (ms, s, m, h, d), such as 30s or 1m.
Timeout: 30s
# Configure a Proxy server for all requests.
Proxy: "https://my.proxy"
Headers:
key: "value"
my-customer-header: "my-custom-value"
# Requests is a list of requests. The Request Name is the key used when referencing the resources returned from the API in the provider.
Requests:
# User-defined descriptive name
- Name: "healthcheck"
# The URL of the Request. The API domain supports be any rfc3986-formatted URI. Lula also supports url `Parameters` as a separate argument.
Url: "https://example.com/health/ready"
# Url Parameters to append to the URL. Lula also supports full URIs in the `Url`.
Parameters:
key: "value"
# Request-level Options have the same specification as the api-spec-level Options. These options apply only to this request.
Options:
# Timeout configures the Request Timeout. Default is no timeout. The Timeout string is a number followed by a unit suffix (ms, s, m, h, d), such as 30s or 1m.
Timeout: 30s
# Configure a Proxy server for all requests.
Proxy: "https://my.proxy"
Headers:
key: "value"
my-customer-header: "my-custom-value"
- Name: "readycheck"
# etc ...
```
2 changes: 1 addition & 1 deletion docs/reference/domains/kubernetes-domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The Kubernetes domain provides Lula access to data collection of Kubernetes reso
## Specification

The Kubernetes specification can be used to return Kubernetes resources as JSON data to the providers. The specification allows for both manifest and resource field data to be retreived.
The Kubernetes specification can be used to return Kubernetes resources as JSON data to the providers. The specification allows for both manifest and resource field data to be retrieved.

The following sample `kubernetes-spec` yields a list of all pods in the `validation-test` namespace.

Expand Down

0 comments on commit 3ace518

Please sign in to comment.