Description of problem: ---------------------- Among the OLM deployments within the openshift-cnv namespace, virt-operator pod is one that does not have a name label. Version-Release number of selected component (if applicable): ------------------------------------------------------------ 4.9.0-167 How reproducible: ---------------- 100% Steps to Reproduce: ------------------ $ oc get pod -n openshift-cnv virt-operator-9b97486b-gq7rn -ojson |jq '.metadata.labels' { "app.kubernetes.io/component": "compute", "app.kubernetes.io/managed-by": "olm", "app.kubernetes.io/part-of": "hyperconverged-cluster", "app.kubernetes.io/version": "v4.9.0", "kubevirt.io": "virt-operator", "pod-template-hash": "9b97486b", "prometheus.kubevirt.io": "" } Actual results: -------------- no "name" label. Expected results: ---------------- The pod should have a name label, e.g. "name": "virt-operator". Additional info:
Indeed. It's not just virt-operator however, some openshift-cnv pods seem to have a name labels and some not (28 with vs. 18 without on my cluster) @ibesso Are all openshift-cnv pods expected to have a name label? If so, is that a new OCP operator requirement? Thanks!
@ibesso also please clarify if the full expected label is "app.kubernetes.io/name" or just "name". The former probably makes more sense.
Re-assigning this BZ to the Installation component as the virt-operator pod itself is actually managed by HCO. Please re-assign if you feel this action is in error.
(In reply to Jed Lejosne from comment #3) > @ibesso also please clarify if the full expected label is > "app.kubernetes.io/name" or just "name". > The former probably makes more sense. just "name", as i see in all other operators pods ($ oc get pod -l "app.kubernetes.io/managed-by=olm" -n openshift-cnv -ojson |jq '.items[].metadata.labels').
(In reply to Jed Lejosne from comment #1) > Indeed. It's not just virt-operator however, some openshift-cnv pods seem to > have a name labels and some not (28 with vs. 18 without on my cluster) > @ibesso Are all openshift-cnv pods expected to have a name label? > If so, is that a new OCP operator requirement? > Thanks! It was not due to a requirement. I needed to use label selector filter to gather all pods in question for my tests. @stirabos , could you please address this question?
(In reply to sgott from comment #4) > Re-assigning this BZ to the Installation component as the virt-operator pod > itself is actually managed by HCO. Please re-assign if you feel this action > is in error. The set of labels for virt-operator pods is defined in spec.template.metadata.labels stanza for the virt-operator deployment in the CSV. This is entirely managed by virt-operator itself when rendering its part of the CSV. Due to this, moving back to virt component. I also want to add that the initial agreement on "required" labels was only about: app.kubernetes.io/managed-by: olm app.kubernetes.io/version: value of env variable HCO_KV_IO_VERSION app.kubernetes.io/component: network, storage, import, compute etc. app.kubernetes.io/part-of: hyperconverged-cluster And currently we already have: spec: template: metadata: labels: app.kubernetes.io/component: compute app.kubernetes.io/managed-by: olm app.kubernetes.io/part-of: hyperconverged-cluster app.kubernetes.io/version: v4.9.0 kubevirt.io: virt-operator prometheus.kubevirt.io: "" So the bare minimal required are already satisfied.
Following Simone's comment, even if it is not required, I thought we could add it to have the "name" label consistently in other pods as well. Apart from that, it could help in my tests, as mentioned in comment 5. Please consider all factors and decide whether the bug should be closed or not.
Thanks for clarifying and sorry for the confusion.
Removed [RFE] from BZ name as this is a bug, not a feature. Targetted for the next release for now.
Update: Created a PR about it: https://github.com/kubevirt/kubevirt/pull/7223
Checked with: iib:219905 The virt-operator pod have a name label [cnv-qe-jenkins@virt-akr-411-jpqfs-executor ~]$ oc get pod -n openshift-cnv virt-operator-5fc6844bd-fw2vq -ojson |jq '.metadata.labels' { "app.kubernetes.io/component": "compute", "app.kubernetes.io/managed-by": "olm", "app.kubernetes.io/part-of": "hyperconverged-cluster", "app.kubernetes.io/version": "4.11.0", "kubevirt.io": "virt-operator", "name": "virt-operator", "pod-template-hash": "5fc6844bd", "prometheus.kubevirt.io": "true" }
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 (Important: OpenShift Virtualization 4.11.0 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:6526