Skip to content

Commit

Permalink
[processor/resourcedetectionprocessor] fix readme layout and extend o…
Browse files Browse the repository at this point in the history
…penshift info (#18071)

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>
  • Loading branch information
frzifus authored Jan 27, 2023
1 parent c051a57 commit b5b272d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions processor/resourcedetectionprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ processors:
detectors: [env, heroku]
timeout: 2s
override: false
```

### Openshift

Expand All @@ -352,12 +353,10 @@ Queries the OpenShift and Kubernetes API to retrieve the following resource attr
* cloud.platform
* cloud.region
* k8s.cluster.name
* k8s.cluster.version
* openshift.cluster.version

Your service account needs `read` access to the API endpoints `/apis/config.openshift.io/v1/clusterversions/version/status`, `/apis/config.openshift.io/v1/infrastructures/cluster/status` and `/version`.
By default, the API address is determined from the environment variables `KUBERNETES_SERVICE_HOST`, `KUBERNETES_SERVICE_PORT` and the service token is read from `/var/run/secrets/kubernetes.io/serviceaccount/token`.
The determination of the API address and the service token is skipped if they are set in the configuration.
If TLS is not explicit disabled and no `ca_file` is configured `/var/run/secrets/kubernetes.io/serviceaccount/ca.crt` is used.
The determination of the API address, ca_file and the service token is skipped if they are set in the configuration.

Example:

Expand All @@ -370,8 +369,13 @@ processors:
openshift: # optional
address: "https://api.example.com"
token: "token"
tls:
insecure: false
ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
```

See: [TLS Configuration Settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md) for the full set of available options.

## Configuration

```yaml
Expand Down

0 comments on commit b5b272d

Please sign in to comment.