Created attachment 1846615 [details] screenshot1 Description of problem: The Kubernetes common labels,https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/, are attached to the logs but have incorrect values. All the logs have Network logs values. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1.Set up OCP logging 2.Search for CNV logs in the Discover tab for: kubernetes.namespace_name:"openshift-cnv" 3.Check the kubernetes common labels in the log records. Actual results: All kubernetes common labels for all CNV log are set based on the Network cnao-operator. Expected results: Correct values should be set for each CNV log Additional info:
We will need to go over all labels and verify they are correct for each operator.
The problem is in the labels of namespace. $ oc get ns openshift-cnv --show-labels NAME STATUS AGE LABELS openshift-cnv Active 16d app.kubernetes.io/component=network,app.kubernetes.io/managed-by=hco-operator,app.kubernetes.io/part-of=hyperconverged-cluster,app.kubernetes.io/version=v4.10.0,control-plane=mac-controller-manager,kubernetes.io/metadata.name=openshift-cnv,name=openshift-cnv,networkaddonsoperator.network.kubevirt.io/version=sha256_abcfc9cbb3ff9a0a396f15eed465cdf9b83b08715621c0986deae2f0,olm.operatorgroup.uid/1ead06cb-9311-4f94-841b-2e93a48947cf=,olm.operatorgroup.uid/86e616d1-1387-4084-8c71-14a656760e4a=,openshift.io/cluster-monitoring=true,prometheus.cnao.io=true The log collector attaches labels of namespace as `kubernetes.namespace_labels` into the logs. That is why all logs seem belong to network component. I agree that we need to fix the labels of namespace. On the other hand, as shown in the screenshots, labels of pods are correct and they are available in "kubernetes.flat_labels" field. When you use the correct field in filtering, there is no issue.
@
Shirly, it is not clear to me from the description whether it is us setting the label or if it is a higher-level component doing it. Could you shed some light on that and help us understand how we could help fix this from the network side?
It seems Network is setting the namespace labels. This affects all the rest of the operators of the openshift-cnv namspace logs.
Blockers only: Moving to 4.10.1
backport PR https://github.com/kubevirt/cluster-network-addons-operator/pull/1277 U/S release-0.65
Please find in the PR desc the list of the labels that were removed https://github.com/kubevirt/cluster-network-addons-operator/pull/1145
Verified. Openshift version 4.10.8 cluster-network-addons-operator v4.10.1-3 Labels mentioned in https://github.com/kubevirt/cluster-network-addons-operator/pull/1145 do not appear on openshift-cnv ns: [cnv-qe-jenkins@n-adiz410n-prrv5-executor ~]$ oc get ns openshift-cnv -o yaml apiVersion: v1 kind: Namespace metadata: annotations: openshift.io/node-selector: "" openshift.io/sa.scc.mcs: s0:c26,c15 openshift.io/sa.scc.supplemental-groups: 1000680000/10000 openshift.io/sa.scc.uid-range: 1000680000/10000 creationTimestamp: "2022-04-06T12:33:52Z" labels: kubernetes.io/metadata.name: openshift-cnv name: openshift-cnv olm.operatorgroup.uid/dd7343ad-1aa9-4a32-8562-daad676de9ae: "" olm.operatorgroup.uid/f2fe655d-22ae-4493-bafe-5452d24da48d: "" openshift.io/cluster-monitoring: "true" name: openshift-cnv resourceVersion: "76119" uid: b9681365-6fbd-4d46-9655-4514754a602a spec: finalizers: - kubernetes status: phase: Active
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Virtualization 4.10.1 Images security and bug fix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:4668