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

Use v1beta1 in docs #2868

Merged
merged 2 commits into from
May 1, 2024
Merged
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
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ Once the `opentelemetry-operator` deployment is ready, create an OpenTelemetry C

```yaml
kubectl apply -f - <<EOF
apiVersion: opentelemetry.io/v1alpha1
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: simplest
spec:
config: |
config:
receivers:
otlp:
protocols:
grpc:
http:
grpc: {}
http: {}
processors:
memory_limiter:
check_interval: 1s
Expand All @@ -50,7 +50,7 @@ spec:
timeout: 10s

exporters:
debug:
debug: {}

service:
pipelines:
Expand Down Expand Up @@ -101,21 +101,21 @@ A sidecar with the OpenTelemetry Collector can be injected into pod-based worklo

```yaml
kubectl apply -f - <<EOF
apiVersion: opentelemetry.io/v1alpha1
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: sidecar-for-my-app
spec:
mode: sidecar
config: |
config:
receivers:
jaeger:
protocols:
thrift_compact:
thrift_compact: {}
processors:

exporters:
debug:
debug: {}

service:
pipelines:
Expand Down Expand Up @@ -599,15 +599,16 @@ For more information about multi-instrumentation feature capabilities please see
The OpenTelemetry Operator comes with an optional component, the [Target Allocator](/cmd/otel-allocator/README.md) (TA). When creating an OpenTelemetryCollector Custom Resource (CR) and setting the TA as enabled, the Operator will create a new deployment and service to serve specific `http_sd_config` directives for each Collector pod as part of that CR. It will also rewrite the Prometheus receiver configuration in the CR, so that it uses the deployed target allocator. The following example shows how to get started with the Target Allocator:

```yaml
apiVersion: opentelemetry.io/v1alpha1
kubectl apply -f - <<EOF
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we rly need this kubectl apply -f - <<EOF \n EOF stuff?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's used across the readme, but it was missing here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nice for getting started

apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: collector-with-ta
spec:
mode: statefulset
targetAllocator:
enabled: true
config: |
config:
receivers:
prometheus:
config:
Expand All @@ -624,14 +625,15 @@ spec:
replacement: $$1

exporters:
debug:
debug: {}

service:
pipelines:
metrics:
receivers: [prometheus]
processors: []
exporters: [debug]
EOF
```

The usage of `$$` in the replacement keys in the example above is based on the information provided in the Prometheus receiver [README](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md) documentation, which states:
Expand Down Expand Up @@ -687,7 +689,8 @@ a function analogous to that of prometheus-operator itself. This is enabled via
See below for a minimal example:

```yaml
apiVersion: opentelemetry.io/v1alpha1
kubectl apply -f - <<EOF
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: collector-with-ta-prometheus-cr
Expand All @@ -698,20 +701,21 @@ spec:
serviceAccount: everything-prometheus-operator-needs
prometheusCR:
enabled: true
config: |
config:
receivers:
prometheus:
config:
config: {}

exporters:
debug:
debug: {}

service:
pipelines:
metrics:
receivers: [prometheus]
processors: []
exporters: [debug]
EOF
```

## Compatibility matrix
Expand Down
2 changes: 1 addition & 1 deletion cmd/otel-allocator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The `spec.targetAllocator:` controls the TargetAllocator general properties. Ful

A basic example that deploys.
```yaml
apiVersion: opentelemetry.io/v1alpha1
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: collector-with-ta
Expand Down
Loading