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

Opentelemetry sidecar schema: managementState required when it's not #430

Closed
luispabon opened this issue Dec 2, 2024 · 2 comments · Fixed by #433
Closed

Opentelemetry sidecar schema: managementState required when it's not #430

luispabon opened this issue Dec 2, 2024 · 2 comments · Fixed by #433

Comments

@luispabon
Copy link

luispabon commented Dec 2, 2024

Looks like certain changes here have broken validation of charts generated by the official opentelemetry chart:

# Validation via Kubeconform
Templating release=otel, chart=charts/system/otel

stdin - OpenTelemetryCollector otel-collector-sidecar is invalid: problem validating schema. Check JSON formatting: jsonschema: '/spec' does not validate with https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/opentelemetry.io/opentelemetrycollector_v1alpha1.json#/properties/spec/required: missing properties: 'managementState'

This is with otel chart 0.74.3 (newest) and the following OpenTelemetryCollector:

apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
  name: otel-collector-sidecar
spec:
  mode: sidecar

  config: |
    receivers:
      jaeger:
        protocols:
          thrift_compact:
      otlp:
        protocols:
          grpc:
          http:

    processors:
      batch:

    exporters:
      logging:
      kafka:
        brokers:
          - kafka-controller-0.kafka-controller-headless.kafka.svc.cluster.local:9092
          - kafka-controller-1.kafka-controller-headless.kafka.svc.cluster.local:9092
          - kafka-controller-2.kafka-controller-headless.kafka.svc.cluster.local:9092
        topic: {{ .Values.environment }}.jaeger-spans.0
        encoding: jaeger_json
        protocol_version: 2.0.0

    service:
      pipelines:
        traces:
          receivers: [jaeger,otlp]
          processors: [batch]
          exporters: [kafka]

The managementState property has a default value of managed, therefore it is not required:

https://github.com/open-telemetry/opentelemetry-operator/blob/main/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml#L2316

@luispabon luispabon changed the title Recent opentelemetry update broke validation of official otel chart Opentelemetry sidecar schema: managementState required when it's not Dec 2, 2024
@eyarz
Copy link
Member

eyarz commented Dec 4, 2024

thank you for investigating this.
do you want to open a PR to fix it?

@luispabon
Copy link
Author

Ah I see you've already fixed it. Thank you 👍🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants