Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and lint Discovery topics third group #2432

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 80 additions & 76 deletions docs/sources/reference/components/discovery/discovery.kubelet.md

Large diffs are not rendered by default.

262 changes: 137 additions & 125 deletions docs/sources/reference/components/discovery/discovery.kubernetes.md

Large diffs are not rendered by default.

97 changes: 49 additions & 48 deletions docs/sources/reference/components/discovery/discovery.kuma.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,62 +27,61 @@ The following arguments are supported:
Name | Type | Description | Default | Required
-------------------------|---------------------|--------------------------------------------------------------------------------------------------|---------|---------
`server` | `string` | Address of the Kuma Control Plane's MADS xDS server. | | yes
`refresh_interval` | `duration` | The time to wait between polling update requests. | `"30s"` | no
`fetch_timeout` | `duration` | The time after which the monitoring assignments are refreshed. | `"2m"` | no
`bearer_token_file` | `string` | File containing a bearer token to authenticate with. | | no
`bearer_token` | `secret` | Bearer token to authenticate with. | | no
`enable_http2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no
`fetch_timeout` | `duration` | The time after which the monitoring assignments are refreshed. | `"2m"` | no
`follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no
`proxy_url` | `string` | HTTP proxy to send requests through. | | no
`no_proxy` | `string` | Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying. | | no
`proxy_from_environment` | `bool` | Use the proxy URL indicated by environment variables. | `false` | no
`proxy_connect_header` | `map(list(secret))` | Specifies headers to send to proxies during CONNECT requests. | | no
`proxy_from_environment` | `bool` | Use the proxy URL indicated by environment variables. | `false` | no
`proxy_url` | `string` | HTTP proxy to send requests through. | | no
`refresh_interval` | `duration` | The time to wait between polling update requests. | `"30s"` | no

At most, one of the following can be provided:
- [`bearer_token` argument](#arguments).
- [`bearer_token_file` argument](#arguments).
- [`basic_auth` block][basic_auth].
- [`authorization` block][authorization].
- [`oauth2` block][oauth2].

* [`bearer_token` argument](#arguments).
* [`bearer_token_file` argument](#arguments).
* [`basic_auth` block][basic_auth].
* [`authorization` block][authorization].
* [`oauth2` block][oauth2].

{{< docs/shared lookup="reference/components/http-client-proxy-config-description.md" source="alloy" version="<ALLOY_VERSION>" >}}

The following blocks are supported inside the definition of
`discovery.kuma`:
The following blocks are supported inside the definition of `discovery.kuma`:

Hierarchy | Block | Description | Required
--------------------|-------------------|----------------------------------------------------------|---------
basic_auth | [basic_auth][] | Configure basic_auth for authenticating to the endpoint. | no
authorization | [authorization][] | Configure generic authorization to the endpoint. | no
oauth2 | [oauth2][] | Configure OAuth2 for authenticating to the endpoint. | no
oauth2 > tls_config | [tls_config][] | Configure TLS settings for connecting to the endpoint. | no
tls_config | [tls_config][] | Configure TLS settings for connecting to the endpoint. | no
Hierarchy | Block | Description | Required
--------------------|-------------------|------------------------------------------------------------|---------
authorization | [authorization][] | Configure generic authorization to the endpoint. | no
basic_auth | [basic_auth][] | Configure `basic_auth` for authenticating to the endpoint. | no
oauth2 | [oauth2][] | Configure OAuth2 for authenticating to the endpoint. | no
oauth2 > tls_config | [tls_config][] | Configure TLS settings for connecting to the endpoint. | no
tls_config | [tls_config][] | Configure TLS settings for connecting to the endpoint. | no

The `>` symbol indicates deeper levels of nesting.
For example, `oauth2 > tls_config` refers to a `tls_config` block defined inside an `oauth2` block.

[basic_auth]: #basic_auth-block
[authorization]: #authorization-block
[oauth2]: #oauth2-block
[tls_config]: #tls_config-block
[authorization]: #authorization
[basic_auth]: #basic_auth
[oauth2]: #oauth2
[tls_config]: #tls_config

### basic_auth block
### authorization

{{< docs/shared lookup="reference/components/basic-auth-block.md" source="alloy" version="<ALLOY_VERSION>" >}}
{{< docs/shared lookup="reference/components/authorization-block.md" source="alloy" version="<ALLOY_VERSION>" >}}

### authorization block
### basic_auth

{{< docs/shared lookup="reference/components/authorization-block.md" source="alloy" version="<ALLOY_VERSION>" >}}
{{< docs/shared lookup="reference/components/basic-auth-block.md" source="alloy" version="<ALLOY_VERSION>" >}}

### oauth2 block
### oauth2

{{< docs/shared lookup="reference/components/oauth2-block.md" source="alloy" version="<ALLOY_VERSION>" >}}

### tls_config block
### tls_config

{{< docs/shared lookup="reference/components/tls-config-block.md" source="alloy" version="<ALLOY_VERSION>" >}}


## Exported fields

The following fields are exported and can be referenced by other components:
Expand All @@ -91,11 +90,12 @@ Name | Type | Description
----------|---------------------|-------------------------------------------------
`targets` | `list(map(string))` | The set of targets discovered from the Kuma API.

The following meta labels are available on targets and can be used by the discovery.relabel component:
* `__meta_kuma_mesh`: the name of the proxy's Mesh
* `__meta_kuma_dataplane`: the name of the proxy
* `__meta_kuma_service`: the name of the proxy's associated Service
* `__meta_kuma_label_<tagname>`: each tag of the proxy
The following meta labels are available on targets and can be used by the `discovery.relabel` component:

* `__meta_kuma_dataplane`: The name of the proxy.
* `__meta_kuma_label_<tagname>`: Each tag of the proxy.
* `__meta_kuma_mesh`: The name of the proxy's Mesh.
* `__meta_kuma_service`: The name of the proxy's associated Service.

## Component health

Expand All @@ -104,11 +104,11 @@ In those cases, exported fields retain their last healthy values.

## Debug information

`discovery.kuma` does not expose any component-specific debug information.
`discovery.kuma` doesn't expose any component-specific debug information.

## Debug metrics

`discovery.kuma` does not expose any component-specific debug metrics.
`discovery.kuma` doesn't expose any component-specific debug metrics.

## Example

Expand All @@ -117,24 +117,25 @@ discovery.kuma "example" {
server = "http://kuma-control-plane.kuma-system.svc:5676"
}
prometheus.scrape "demo" {
targets = discovery.kuma.example.targets
forward_to = [prometheus.remote_write.demo.receiver]
targets = discovery.kuma.example.targets
forward_to = [prometheus.remote_write.demo.receiver]
}
prometheus.remote_write "demo" {
endpoint {
url = PROMETHEUS_REMOTE_WRITE_URL
basic_auth {
username = USERNAME
password = PASSWORD
}
}
endpoint {
url = <PROMETHEUS_REMOTE_WRITE_URL>
basic_auth {
username = <USERNAME>
password = <PASSWORD>
}
}
}
```

Replace the following:
- `PROMETHEUS_REMOTE_WRITE_URL`: The URL of the Prometheus remote_write-compatible server to send metrics to.
- `USERNAME`: The username to use for authentication to the remote_write API.
- `PASSWORD`: The password to use for authentication to the remote_write API.

* _`<PROMETHEUS_REMOTE_WRITE_URL>`_: The URL of the Prometheus remote_write-compatible server to send metrics to.
* _`<USERNAME>`_: The username to use for authentication to the `remote_write` API.
* _`<PASSWORD>`_: The password to use for authentication to the `remote_write` API.

<!-- START GENERATED COMPATIBLE COMPONENTS -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ title: discovery.lightsail
## Usage

```alloy
discovery.lightsail "LABEL" {
discovery.lightsail "<LABEL>" {
}
```

Expand All @@ -23,29 +23,30 @@ The following arguments are supported:

Name | Type | Description | Default | Required
-------------------------|---------------------|-------------------------------------------------------------------------------------------------------------------------|---------|---------
`endpoint` | `string` | Custom endpoint to be used. | | no
`region` | `string` | The AWS region. If blank, the region from the instance metadata is used. | | no
`access_key` | `string` | The AWS API key ID. If blank, the environment variable `AWS_ACCESS_KEY_ID` is used. | | no
`secret_key` | `string` | The AWS API key secret. If blank, the environment variable `AWS_SECRET_ACCESS_KEY` is used. | | no
`profile` | `string` | Named AWS profile used to connect to the API. | | no
`role_arn` | `string` | AWS Role ARN, an alternative to using AWS API keys. | | no
`refresh_interval` | `string` | Refresh interval to re-read the instance list. | 60s | no
`port` | `int` | The port to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule. | 80 | no
`bearer_token_file` | `string` | File containing a bearer token to authenticate with. | | no
`bearer_token` | `secret` | Bearer token to authenticate with. | | no
`enable_http2` | `bool` | Whether HTTP2 is supported for requests. | `true` | no
`endpoint` | `string` | Custom endpoint to be used. | | no
`follow_redirects` | `bool` | Whether redirects returned by the server should be followed. | `true` | no
`proxy_url` | `string` | HTTP proxy to send requests through. | | no
`no_proxy` | `string` | Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying. | | no
`proxy_from_environment` | `bool` | Use the proxy URL indicated by environment variables. | `false` | no
`port` | `int` | The port to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule. | 80 | no
`profile` | `string` | Named AWS profile used to connect to the API. | | no
`proxy_connect_header` | `map(list(secret))` | Specifies headers to send to proxies during CONNECT requests. | | no
`proxy_from_environment` | `bool` | Use the proxy URL indicated by environment variables. | `false` | no
`proxy_url` | `string` | HTTP proxy to send requests through. | | no
`refresh_interval` | `string` | Refresh interval to re-read the instance list. | 60s | no
`region` | `string` | The AWS region. If blank, the region from the instance metadata is used. | | no
`role_arn` | `string` | AWS Role ARN, an alternative to using AWS API keys. | | no
`secret_key` | `string` | The AWS API key secret. If blank, the environment variable `AWS_SECRET_ACCESS_KEY` is used. | | no

At most, one of the following can be provided:
- [`bearer_token` argument](#arguments).
- [`bearer_token_file` argument](#arguments).
- [`basic_auth` block][basic_auth].
- [`authorization` block][authorization].
- [`oauth2` block][oauth2].

* [`authorization` block][authorization]
* [`basic_auth` block][basic_auth]
* [`bearer_token_file` argument][arguments]
* [`bearer_token` argument][arguments]
* [`oauth2` block][oauth2]

[arguments]: #arguments

Expand All @@ -58,33 +59,33 @@ The following blocks are supported inside the definition of

Hierarchy | Block | Description | Required
--------------------|-------------------|----------------------------------------------------------|---------
basic_auth | [basic_auth][] | Configure basic_auth for authenticating to the endpoint. | no
authorization | [authorization][] | Configure generic authorization to the endpoint. | no
basic_auth | [basic_auth][] | Configure basic_auth for authenticating to the endpoint. | no
oauth2 | [oauth2][] | Configure OAuth2 for authenticating to the endpoint. | no
oauth2 > tls_config | [tls_config][] | Configure TLS settings for connecting to the endpoint. | no
tls_config | [tls_config][] | Configure TLS settings for connecting to the endpoint. | no

The `>` symbol indicates deeper levels of nesting.
For example, `oauth2 > tls_config` refers to a `tls_config` block defined inside an `oauth2` block.

[basic_auth]: #basic_auth-block
[authorization]: #authorization-block
[oauth2]: #oauth2-block
[tls_config]: #tls_config-block
[authorization]: #authorization
[basic_auth]: #basic_auth
[oauth2]: #oauth2
[tls_config]: #tls_config

### basic_auth block
### authorization

{{< docs/shared lookup="reference/components/basic-auth-block.md" source="alloy" version="<ALLOY_VERSION>" >}}
{{< docs/shared lookup="reference/components/authorization-block.md" source="alloy" version="<ALLOY_VERSION>" >}}

### authorization block
### basic_auth

{{< docs/shared lookup="reference/components/authorization-block.md" source="alloy" version="<ALLOY_VERSION>" >}}
{{< docs/shared lookup="reference/components/basic-auth-block.md" source="alloy" version="<ALLOY_VERSION>" >}}

### oauth2 block
### oauth2

{{< docs/shared lookup="reference/components/oauth2-block.md" source="alloy" version="<ALLOY_VERSION>" >}}

### tls_config block
### tls_config

{{< docs/shared lookup="reference/components/tls-config-block.md" source="alloy" version="<ALLOY_VERSION>" >}}

Expand Down Expand Up @@ -117,11 +118,11 @@ In those cases, exported fields retain their last healthy values.

## Debug information

`discovery.lightsail` does not expose any component-specific debug information.
`discovery.lightsail` doesn't expose any component-specific debug information.

## Debug metrics

`discovery.lightsail` does not expose any component-specific debug metrics.
`discovery.lightsail` doesn't expose any component-specific debug metrics.

## Example

Expand All @@ -137,19 +138,21 @@ prometheus.scrape "demo" {

prometheus.remote_write "demo" {
endpoint {
url = PROMETHEUS_REMOTE_WRITE_URL
url = <PROMETHEUS_REMOTE_WRITE_URL>

basic_auth {
username = USERNAME
password = PASSWORD
username = <USERNAME>
password = <PASSWORD>
}
}
}
```

Replace the following:
- `PROMETHEUS_REMOTE_WRITE_URL`: The URL of the Prometheus remote_write-compatible server to send metrics to.
- `USERNAME`: The username to use for authentication to the remote_write API.
- `PASSWORD`: The password to use for authentication to the remote_write API.

* _`<PROMETHEUS_REMOTE_WRITE_URL>`_: The URL of the Prometheus remote_write-compatible server to send metrics to.
* _`<USERNAME>`_: The username to use for authentication to the `remote_write` API.
* _`<PASSWORD>`_: The password to use for authentication to the `remote_write` API.

<!-- START GENERATED COMPATIBLE COMPONENTS -->

Expand Down
Loading
Loading