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 opentelemetry.io schemas to the latest chart 0.74.3 #428

Merged
merged 1 commit into from
Dec 1, 2024

Conversation

vgazzola
Copy link
Contributor

These CRDs were generated using

dependencies:
  - name: opentelemetry-operator
    repository: https://open-telemetry.github.io/opentelemetry-helm-charts
    version: 0.74.3

deployed on a local kubernetes environment (Docker desktop), exported with crd-extractor.sh and tested locally with an object kind: OpenTelemetryCollector v1beta1 and instrumentation. I did not validate the other version/object kind

opentelemetrycollector_v1beta1

#valid collector
kubeconform -summary  -schema-location ~/.datree/crdSchemas/opentelemetrycollector_v1beta1.json -strict  /tmp/eventhub/otel-eventhub/charts/open/templates/collector.yaml
Summary: 1 resource found in 1 file - Valid: 1, Invalid: 0, Errors: 0, Skipped: 0

#removing a needed field
 kubeconform -summary  -schema-location ~/.datree/crdSchemas/opentelemetrycollector_v1beta1.json -strict  /tmp/eventhub/otel-eventhub/charts/open/templates/collector.yaml
/tmp/eventhub/otel-eventhub/charts/open/templates/collector.yaml - OpenTelemetryCollector test-collector is invalid: problem validating schema. Check JSON formatting: jsonschema: '/spec' does not validate with file:///~/.datree/crdSchemas/opentelemetrycollector_v1beta1.json#/properties/spec/required: missing properties: 'managementState'
Summary: 1 resource found in 1 file - Valid: 0, Invalid: 1, Errors: 0, Skipped: 0

/instrumentation_v1alpha1

# Valid object
 kubeconform -summary  -schema-location ~/.datree/crdSchemas/instrumentation_v1alpha1.json -strict  /Users/vag/workspace/tmp/kubeconform/instrumentation.yaml
Summary: 1 resource found in 1 file - Valid: 1, Invalid: 0, Errors: 0, Skipped: 0

# Adding a wrong property
  kubeconform -summary  -schema-location ~/.datree/crdSchemas/instrumentation_v1alpha1.json -strict  /Users/vag/workspace/tmp/kubeconform/instrumentation.yaml
/Users/vag/workspace/tmp/kubeconform/instrumentation.yaml - Instrumentation go-instrumentation is invalid: problem validating schema. Check JSON formatting: jsonschema: '/spec' does not validate with file:///Users/vag/.datree/crdSchemas/instrumentation_v1alpha1.json#/properties/spec/additionalProperties: additionalProperties 'foo' not allowed
Summary: 1 resource found in 1 file - Valid: 0, Invalid: 1, Errors: 0, Skipped: 0

@eyarz
Copy link
Member

eyarz commented Dec 1, 2024

@vgazzola nice job on the detailed description and testing!

@eyarz eyarz merged commit ddd9802 into datreeio:main Dec 1, 2024
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 this pull request may close these issues.

2 participants