Closed witzatom closed 4 years ago
This is not a bug, because PodMonitor doesn't require a Service, it directly selects Pods by labels, see the example:
spec:
podTargetLabels:
- cluster
- component
selector:
matchLabels:
app: flink
# Specify the port name of the exposed metric port
podMetricsEndpoints:
- port: prom
Also, for TaskManagers, there is no Service for them.
ok, agreed, i can use k8 discovery in prometheus to find the pods so dont need the static binding.
Hey, running the latest flink operator v1beta1-7 (gcr.io/flink-operator/flink-operator@sha256:e13804b93a988a4475e05b742eea9cd7dec5a5e36fc213e0ff8fe4d8ea963920). I use the config from https://github.com/GoogleCloudPlatform/flink-on-k8s-operator/blob/master/examples/prometheus/flink_metric_cluster.yaml.
The resulting jobmanager pod does get a port opened:
But the service does not, so its difficult to use the prometheus metrics in a prometheus setup:
Not sure if this is a bug or a feature request. However the actual pod ports are unlikely to be used unless they are exposed as service ports, so I think its a bug?
The issue is that this function here has no mention of the jobmanager extraPorts. Probably fixed by adding something similar to: