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

Commits on Aug 17, 2023

  1. fix reconciliation error when prometheusremotewrite exporter is enabled

    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 committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    f029a59 View commit details
    Browse the repository at this point in the history