-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.21.0
-
None
Description of problem:
https://github.com/openshift/cluster-monitoring-operator/pull/2749 updated ghcr.io/rhobs/prometheus-example-app to 0.5.0, enabled UWM and deployed with the image, configuration see below
apiVersion: v1 kind: Namespace metadata: name: ns2 --- apiVersion: apps/v1 kind: Deployment metadata: labels: app: prometheus-example-app name: prometheus-example-app namespace: ns2 spec: replicas: 1 selector: matchLabels: app: prometheus-example-app template: metadata: labels: app: prometheus-example-app spec: containers: - image: ghcr.io/rhobs/prometheus-example-app:0.5.0 imagePullPolicy: IfNotPresent name: prometheus-example-app --- apiVersion: v1 kind: Service metadata: labels: app: prometheus-example-app name: prometheus-example-app namespace: ns2 spec: ports: - port: 8080 protocol: TCP targetPort: 8080 name: web selector: app: prometheus-example-app type: ClusterIP --- apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: prometheus-example-monitor namespace: ns2 spec: endpoints: - interval: 30s port: web scheme: http namespaceSelector: matchNames: - ns2 selector: matchLabels: app: prometheus-example-app
check the version metrics, version value is v0.4.2, not v0.5.0,
NOTE: seems this can not be fixed in CMO, could close this bug then
$ token=`oc create token prometheus-k8s -n openshift-monitoring` $ oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -k -H "Authorization: Bearer $token" 'https://thanos-querier.openshift-monitoring.svc:9091/api/v1/query?' --data-urlencode 'query=version{namespace="ns2"}' | jq { "status": "success", "data": { "resultType": "vector", "result": [ { "metric": { "__name__": "version", "endpoint": "web", "instance": "10.128.2.19:8080", "job": "prometheus-example-app", "namespace": "ns2", "pod": "prometheus-example-app-7895496644-vflb5", "prometheus": "openshift-user-workload-monitoring/user-workload", "service": "prometheus-example-app", "version": "v0.4.2" }, "value": [ 1764310947.411, "1" ] } ], "analysis": {} } }
Version-Release number of selected component (if applicable):
4.21
How reproducible:
always
Steps to Reproduce:
1. see the description
Actual results:
version is v0.4.2
Expected results:
should be v0.5.0
Additional info: