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

Need to Update nodeSelector in CronJob on Version 4.20

XMLWordPrintable

    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Low
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      In version 4.20.8, a default CronJob named machine-config-nodes-crd-cleanup exists in the openshift-machine-config-operator namespace.
      Currently, this CronJob uses the following nodeSelector:
      ```
      node-role.kubernetes.io/master
      ```
      
      For a more future-proof and standardized configuration, this should be updated to:
      ```
      node-role.kubernetes.io/control-plane
      ```
      
      Using control-plane aligns with current Kubernetes and OpenShift naming conventions and ensures compatibility with future releases. This change is also recommended in the referenced KCS article for better role naming and long-term support.
      
      https://access.redhat.com/solutions/7002512
      
      
      Additionally, when this CronJob is manually executed from the OpenShift web console, a popup warning message is displayed. This behavior is related to the usage of the deprecated master node role and further highlights the need to update the nodeSelector to control-plane.
      
      ~~~
      Admission Webhook Warning
      
      CronJob machine-config-nodes-crd-cleanup violates policy 299 - "spec.jobTemplate.spec.template.spec.nodeSelector[node-role.kubernetes.io/master]: use \"node-role.kubernetes.io/control-plane\" instead"
      ~~~

      Version-Release number of selected component (if applicable):

          

      How reproducible:

          100%

      Steps to Reproduce:

          1. Run the machine-config-nodes-crd-cleanup cronjob manually from the web console
          

      Actual results:

         Warning: spec.jobTemplate.spec.template.spec.nodeSelector[node-role.kubernetes.io/master]: use "node-role.kubernetes.io/control-plane" instead
       

      Expected results:

         nodeSelector parameter should be node-role.kubernetes.io/control-plane in the cronjob.

      Additional info:

          

              team-mco Team MCO
              rhn-support-arbhagat Arpit Bhagat
              None
              None
              Sergio Regidor de la Rosa Sergio Regidor de la Rosa
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: