We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It seems whenever using a secretRef with Prometheus CustomAuth auth type, a new line is either added or not removed from the actual values.
Using the below manifests, Keda should be able to retrieve metrics from Prometheus:
apiVersion: v1 items: - apiVersion: keda.sh/v1alpha1 kind: ClusterTriggerAuthentication metadata: finalizers: - finalizer.keda.sh name: keda-prom-creds spec: secretTargetRef: - key: PRIVATE_KEY name: secret-keys parameter: customAuthValue - key: authToken name: secret-keys parameter: customAuthHeader kind: List
where value is:
authToken: dG9rZW4K (== "token")
Keda operator fails with error: net/http: invalid header field name \"token\\n\"
net/http: invalid header field name \"token\\n\"
2023-09-07T06:33:13Z ERROR scale_handler error getting metric for scaler {"scaledObject.Namespace": "hpa-tenant", "scaledObject.Name": "prometheus-so-test-metric", "scaler": "prometheusScaler", "error": "Get \"https://prom-server.com/api/v1/query?query=sum%28rate%28container_cpu_usage_seconds_total%7Bnamespace%3D~%22.%2Ahpa-tenant.%2A%22%2Ccontainer%3D%22dal%22%7D%5B5m%5D%29+%2F+%28kube_pod_container_resource_limits%7Bnamespace%3D~%22.%2Ahpa-tenant.%2A%22%2Ccontainer%3D%22dal%22%2Cresource%3D%22cpu%22%7D%29%29+by+%28container%2C+namespace%29+%2A+100&time=2023-09-07T06:33:13Z\": net/http: invalid header field name \"token\\n\""}
2.11.1
1.27
Amazon Web Services
Prometheus
No response
The text was updated successfully, but these errors were encountered:
Fixed in PR #4959
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Report
It seems whenever using a secretRef with Prometheus CustomAuth auth type, a new line is either added or not removed from the actual values.
Expected Behavior
Using the below manifests, Keda should be able to retrieve metrics from Prometheus:
where value is:
Actual Behavior
Keda operator fails with error:
net/http: invalid header field name \"token\\n\"
Steps to Reproduce the Problem
Logs from KEDA operator
KEDA Version
2.11.1
Kubernetes Version
1.27
Platform
Amazon Web Services
Scaler Details
Prometheus
Anything else?
No response
The text was updated successfully, but these errors were encountered: