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

fix reconciliation error when prometheusremotewrite exporter is enabled #2029

Closed
wants to merge 1 commit into from

Conversation

lauri-paypay
Copy link

#1953 introduced the following error when prometheusremotewrite exporter is enabled

failed to reconcile the expected deployments: failed to apply changes: Deployment.apps "cluster-collector" is invalid: spec.template.spec.containers[0].ports[3].containerPort: Required value"

required configuration is:

exporters:
  prometheusremotewrite:
    endpoint: "https://example.com/api/v1/write"

getPrometheusExporterPorts() tries to parse this endpoint into a host:port pair, because the exporter name contains the string "prometheus", but prometheusremotewriteexporter's expected endpoint configuration is actually a URL, so that fails. additionally, due to a missing continue if the port parsing fails, an erroneous ContainerPort entry with port set to 0 is added to the configuration, causing the error.

open-telemetry#1953
introduced the following error when prometheusremotewrite exporter is
enabled

	failed to reconcile the expected deployments: failed to apply changes: Deployment.apps "cluster-collector" is invalid: spec.template.spec.containers[0].ports[3].containerPort: Required value"

required configuration is:

	exporters:
	  prometheusremotewrite:
	    endpoint: "https://example.com/api/v1/write"

getPrometheusExporterPorts() tries to parse this endpoint into a
host:port pair, because the exporter name contains the string
"prometheus", but prometheusremotewriteexporter's expected `endpoint`
configuration is actually a URL, so that fails. additionally, due to a
missing `continue` if the port parsing fails, an erroneous ContainerPort
entry with port set to 0 is added to the configuration, causing the
error.

Signed-off-by: Lauri Tirkkonen <lauri.tirkkonen@paypay-corp.co.jp>
@lauri-paypay lauri-paypay requested a review from a team August 17, 2023 08:04
@linux-foundation-easycla
Copy link

CLA Not Signed

@swiatekm
Copy link
Contributor

Looks like a duplicate of #2017, can you have a look and confirm @lauri-paypay ?

@lauri-paypay
Copy link
Author

@swiatekm-sumo you're right, it's duplicate. closing this one.

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