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

Improve UX for OpenTelemetry Operator CRs #210

Open
mmanciop opened this issue Nov 21, 2023 · 0 comments
Open

Improve UX for OpenTelemetry Operator CRs #210

mmanciop opened this issue Nov 21, 2023 · 0 comments

Comments

@mmanciop
Copy link
Member

mmanciop commented Nov 21, 2023

With #207, OTelBin is stripping transparently the CR envelope of the OpenTelemetry Operator, but the experience feels surprising and not understandable, as the content you pasted is not what you copied. Instead, we should keep the CR envelop, and commented it out. For example, consider the following CR from the OpenTelemetry Operator repository:

apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
  name: simplest
spec:
  config: |
    receivers:
      otlp:
        protocols:
          grpc:
          http:
    processors:
      memory_limiter:
        check_interval: 1s
        limit_percentage: 75
        spike_limit_percentage: 15
      batch:
        send_batch_size: 10000
        timeout: 10s

    exporters:
      debug:

    service:
      pipelines:
        traces:
          receivers: [otlp]
          processors: []
          exporters: [debug]

In OTelBin, the content of the edit pane should be:

# apiVersion: opentelemetry.io/v1alpha1
# kind: OpenTelemetryCollector
# metadata:
#  name: simplest
# spec:
#  config: |
receivers:
  otlp:
    protocols:
      grpc:
      http:
processors:
  memory_limiter:
    check_interval: 1s
      limit_percentage: 75
      spike_limit_percentage: 15
    batch:
      send_batch_size: 10000
      timeout: 10s

exporters:
  debug:

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: []
      exporters: [debug]

Notice that, in the above:

  1. All CR-related YAML is commented out with an additional # string at the the beginning of the line. This should apply also to lines that already start with # so that VS Code or similar IDEs can strip it away again easily.
  2. The indentation of the actual configuration is adjusted.

This, coupled with #194, would lead to a smooth experience using OTelBin with the OpenTelemetry operator, as the commented-out YAML keeps the namespace, name, label and other metadata the end user will need to be able to directly patch their resources.

@mmanciop mmanciop changed the title Improve UX for Kubernetes CRDs Improve UX for OpenTelemetry Operator CRs Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants