-
Notifications
You must be signed in to change notification settings - Fork 27
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
Feat: export correct namespace #307
Feat: export correct namespace #307
Conversation
…(which is the same as container_namespace) applied after scraping Signed-off-by: Bastien Grasnick <[email protected]>
…nitoring Signed-off-by: Bastien Grasnick <[email protected]>
b430c78
to
49559f5
Compare
…kload monitoring" This reverts commit 1e395b7. Signed-off-by: Bastien Grasnick <[email protected]>
49559f5
to
b82f99e
Compare
metricRelabelings := []*monv1.RelabelConfig{{ | ||
Action: "replace", | ||
SourceLabels: []monv1.LabelName{ | ||
"container_namespace", | ||
}, | ||
TargetLabel: "namespace", | ||
}} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BGrasnick Have you tested this on OpenShift? IIUC, this will not be honoured in openshift if you use User Project Monitoring.
@BGrasnick I am going to close this due to the reason mentioned above. Please feel free to reopen if you have found a solution for this. Meanwhile we have added the dashboards to developer view as well. So any user with |
This PR makes the ServiceMonitor relabel namespace to have the same value as container_namespace instead of "openshift-kepler-operator" applied after scraping so that it is more straight-forward to use the metrics.
Also adds label
"openshift.io/cluster-monitoring": "true"
so that the metrics get scraped by openshift-monitoring instead of user workload monitoring which makes usage more straight-forward.I am not sure if this is wanted for kepler-operator but in our use case it would be much better. In case this is not the intended behaviour, we can just revert the corresponding commit.
Was tested and works on OpenShift 4.11 cluster.
Addresses #302