You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with regards to theMonitoring feature, the endpoint was defined with scheme http, but the serviceMonitor created was of scheme HTTPS causing it to not function as intended. Even if the scheme was left empty, the default as per the documentation is http but the serviceMonitor was of scheme https
What did you expect to see?
Expected to see http as the default scheme for ServiceMonitor created by the operator.
What did you see instead?
HTTPS was the scheme in the service monitor created by the operator
Environment
OpenShift
Possible solution
The issue is identified to be in the utils/utils.go file in line 1203-1207
The problem is solved if the tlsConfig of the first endpoint is not nil. So giving an empty value in any of the fields results in http scheme being used.
in the second if statement if there are no endpoints or if the first endpoint has no TLSConfig, it is setting the scheme to https. This is the issue that needs to be fixed.
Additional context
If there is only one intended end point and that has to be http then this logic does not allow the same.
The text was updated successfully, but these errors were encountered:
@dhanush251201 TLS management (at both app level and the ServiceMonitor level) is enabled by default on the RuntimeComponent through the .spec.manageTLS flag.
So we override the ServiceMonitor endpoint to be https to correspond to the RuntimeComponent which is normal behavior from the operator. When setting .spec.manageTLS to false, it falls back to http, as per Prometheus docs.
However, I see that your issue is with the lack of customizability with the scheme forced to be https for the single ServiceMonitor endpoint. We can make it easier to allow opting-out of the https override for the endpoint but still have TLS managed on the RuntimeComponent app.
Bug Report
What did you do?
with regards to theMonitoring feature, the endpoint was defined with scheme http, but the serviceMonitor created was of scheme HTTPS causing it to not function as intended. Even if the scheme was left empty, the default as per the documentation is http but the serviceMonitor was of scheme https
What did you expect to see?
Expected to see http as the default scheme for ServiceMonitor created by the operator.
What did you see instead?
HTTPS was the scheme in the service monitor created by the operator
Environment
OpenShift
Possible solution
The issue is identified to be in the utils/utils.go file in line 1203-1207
The problem is solved if the tlsConfig of the first endpoint is not nil. So giving an empty value in any of the fields results in http scheme being used.
in the second if statement if there are no endpoints or if the first endpoint has no TLSConfig, it is setting the scheme to https. This is the issue that needs to be fixed.
Additional context
If there is only one intended end point and that has to be http then this logic does not allow the same.
The text was updated successfully, but these errors were encountered: