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

Invalid URL endpoint in outputs skips config generation without propagating the problem into the status #1270

Closed
a-thaler opened this issue Jul 12, 2024 · 1 comment · Fixed by #1329
Assignees
Labels
area/metrics MetricPipeline area/traces TracePipeline kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@a-thaler
Copy link
Collaborator

a-thaler commented Jul 12, 2024

Description

Assumed you have a successful running TracePipeline and you add a second one.
Assumed the new TracePipeline uses an otlp-http configuration like this:

spec:
  output:
    otlp:
      endpoint:
        valueFrom:
          secretKeyRef:
            key: apiurl
            name: mySecret
            namespace: myNamespace
      path: v2/otlp/v1/traces
      protocol: http

having then the actual value quoted with '', like when creating the secret with kubectl create secret generic test --from-literal apiurl="'https://icke.com'"

then the telemetry-manager will fail the reconcilation of the new pipeline with following log message. It will not touch the agent config and keep the pipeline status healthy.

{"level":"ERROR","timestamp":"2024-07-12T15:46:05Z","caller":"controller/controller.go:324","message":"Reconciler error","context":{"controller":"metricpipeline","controllerGroup":"telemetry.kyma-project.io","controllerKind":"MetricPipeline","MetricPipeline":{"name":"dynatrace"},"namespace":"","name":"icke","reconcileID":"30c7b93e-809e-4eec-88ff-20a025b4e4de","error":"failed to reconcile metric gateway: failed to create collector config: failed to make otlp exporter config: failed to make env vars: parse \"'https://icke.com'\": first path segment in URL cannot contain colon"}}

Expected result

The pipeline has the "ConfigurationGenerated" status set to "false" with a meaningful reason telling me that I provided a bad URL

Actual result
It silently ignores my pipeline, the gateway continues to run, but data will never arrive

Steps to reproduce

Troubleshooting

Release Notes


@a-thaler a-thaler added kind/bug Categorizes issue or PR as related to a bug. area/metrics MetricPipeline area/traces TracePipeline labels Jul 12, 2024
@k15r k15r assigned k15r and unassigned k15r Jul 16, 2024
@shorim
Copy link
Contributor

shorim commented Jul 19, 2024

Let's consider if we want to consolidate all invalid configurations (for example TLSConfigurationInvalid) under one reason. in the ConfigurationGenerated condition

@TeodorSAP TeodorSAP self-assigned this Jul 29, 2024
@a-thaler a-thaler added this to the 1.22.0 milestone Aug 19, 2024
@a-thaler a-thaler changed the title Invalid URL endpoint in otlp-http output skips config generation without propagating the problem into the status Invalid URL endpoint in outputs skips config generation without propagating the problem into the status Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metrics MetricPipeline area/traces TracePipeline kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants