KEDA doesn't seem to support TLS for '/metrics' endpoint for any of it's components?
#5,304 opened on Dec 21, 2023
Repository metrics
- Stars
- (10,372 stars)
- PR merge metrics
- (PR metrics pending)
Description
Discussed in https://github.com/kedacore/keda/discussions/5302
Originally posted by AshutoshNirkhe December 20, 2023 I checked a few references (below links) and glad to understand that TLS is inherently supported/enabled among different KEDA components. In fact, it supports us to provide our custom CA and own certificates. https://keda.sh/blog/2023-05-02-certificate-improvements/ https://github.com/kedacore/keda-docs/pull/1057/files#diff-8156f5370ce315e79d101fdc9cd7bca585e1efc378ad48f8c82b977099378b44
But I didn't get a clarity where we can enable TLS for '/metrics/' endpoint (e.g. port 8080 for keda-operator, port 9022 for keda-operator-metrics-apiserver and port 8080 for keda-admission-webhooks)
I tried passing in our custom CA and certs (with helm by using https://github.com/kedacore/charts/blob/main/keda/values.yaml#L686), and it did seem to work for the main ports (e.g. communication between keda-operator:9666 and keda-operator-metrics-apiserver is using TLS). But for metrics server, I see this in logs,
2023-12-20T03:46:57Z INFO controller-runtime.metrics Serving metrics server {"bindAddress": ":8080", **"secure": false**}
I also got the link https://github.com/kedacore/keda/issues/2850#issuecomment-1086878016 , where it seems like this is not required because its exposed internally. But if we expose those ports in the service, it can be hit from outside like by Prometheus to collect metrics right? Shouldn't they support TLS in that case?
cc : @JorTurFer as I found most of the TLS links/PRs from you :)