Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-42371

Tolerate extra labels set by operators with compare tool

XMLWordPrintable

    • None
    • Telco kube-compare Sprint 260, Telco kube-compare Sprint 261, Telco kube-compare Sprint 262
    • 3
    • False
    • Hide

      None

      Show
      None
    • Release Note Not Required
    • In Progress

      Description of problem:

      Labels added by the operator are reported as error by the compare tool
          

      Example of errors due to extra labels:

      Differences found in CR: v1_Namespace_openshift-nmstate, Compared To Reference CR: required/networking/NMStateNS.yaml
      diff -u -N /tmp/MERGED-3095389137/v1_namespace_openshift-nmstate /tmp/LIVE-1975805565/v1_namespace_openshift-nmstate
      --- /tmp/MERGED-3095389137/v1_namespace_openshift-nmstate	2024-09-20 18:02:23.681892199 +0300
      +++ /tmp/LIVE-1975805565/v1_namespace_openshift-nmstate	2024-09-20 18:02:23.681892199 +0300
      @@ -3,4 +3,7 @@
       metadata:
         annotations:
           workload.openshift.io/allowed: management
      +  labels:
      +    name: openshift-nmstate
      +    openshift.io/cluster-monitoring: "true"
         name: openshift-nmstate
      
      Differences found in CR: operators.coreos.com/v1alpha1_Subscription_metallb-system_metallb-operator-sub, Compared To Reference CR: required/networking/metallb/metallbSubscription.yaml
      diff -u -N /tmp/MERGED-291655338/operators-coreos-com-v1alpha1_subscription_metallb-system_metallb-operator-sub /tmp/LIVE-3971091928/operators-coreos-com-v1alpha1_subscription_metallb-system_metallb-operator-sub
      --- /tmp/MERGED-291655338/operators-coreos-com-v1alpha1_subscription_metallb-system_metallb-operator-sub	2024-09-20 18:02:23.713892477 +0300
      +++ /tmp/LIVE-3971091928/operators-coreos-com-v1alpha1_subscription_metallb-system_metallb-operator-sub	2024-09-20 18:02:23.713892477 +0300
      @@ -1,11 +1,13 @@
       apiVersion: operators.coreos.com/v1alpha1
       kind: Subscription
       metadata:
      +  labels:
      +    operators.coreos.com/metallb-operator.metallb-system: ""
         name: metallb-operator-sub
         namespace: metallb-system
       spec:
         channel: stable
      
      Differences found in CR: operators.coreos.com/v1alpha1_Subscription_openshift-logging_cluster-logging, Compared To Reference CR: optional/logging/ClusterLogSubscription.yaml
      diff -u -N /tmp/MERGED-3709024899/operators-coreos-com-v1alpha1_subscription_openshift-logging_cluster-logging /tmp/LIVE-2746254088/operators-coreos-com-v1alpha1_subscription_openshift-logging_cluster-logging
      --- /tmp/MERGED-3709024899/operators-coreos-com-v1alpha1_subscription_openshift-logging_cluster-logging	2024-09-20 18:02:23.715892494 +0300
      +++ /tmp/LIVE-2746254088/operators-coreos-com-v1alpha1_subscription_openshift-logging_cluster-logging	2024-09-20 18:02:23.715892494 +0300
      @@ -1,11 +1,13 @@
       apiVersion: operators.coreos.com/v1alpha1
       kind: Subscription
       metadata:
      +  labels:
      +    operators.coreos.com/cluster-logging.openshift-logging: ""
         name: cluster-logging
         namespace: openshift-logging
       spec:
         channel: stable
      
      Differences found in CR: operators.coreos.com/v1alpha1_Subscription_openshift-nmstate_kubernetes-nmstate-operator, Compared To Reference CR: required/networking/NMStateSubscription.yaml
      diff -u -N /tmp/MERGED-2028948133/operators-coreos-com-v1alpha1_subscription_openshift-nmstate_kubernetes-nmstate-operator /tmp/LIVE-2201029534/operators-coreos-com-v1alpha1_subscription_openshift-nmstate_kubernetes-nmstate-operator
      --- /tmp/MERGED-2028948133/operators-coreos-com-v1alpha1_subscription_openshift-nmstate_kubernetes-nmstate-operator	2024-09-20 18:02:23.716892503 +0300
      +++ /tmp/LIVE-2201029534/operators-coreos-com-v1alpha1_subscription_openshift-nmstate_kubernetes-nmstate-operator	2024-09-20 18:02:23.717892512 +0300
      @@ -1,11 +1,13 @@
       apiVersion: operators.coreos.com/v1alpha1
       kind: Subscription
       metadata:
      +  labels:
      +    operators.coreos.com/kubernetes-nmstate-operator.openshift-nmstate: ""
         name: kubernetes-nmstate-operator
         namespace: openshift-nmstate
       spec:
         channel: stable
      

            jramsay1@redhat.com Jim Ramsay
            yprokule@redhat.com Yurii Prokulevych
            Yogesh Ahire Yogesh Ahire
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: