Description of problem: The documentation [1] for the KubeletConfig object states that the machineConfigPoolSelector will match all resources when the selector is empty and will match no resources when the selector is null. However, when testing I saw that an empty selector matches nothing. Also, the controller's source code [2] includes a comment that describes different behavior: "// If a pool with a nil or empty selector creeps in, it should match nothing, not everything." Version-Release number of selected component (if applicable): OCP v4.5.9 How reproducible: Always Steps to Reproduce: 1. Create a KubeletConfig resource with an empty machineConfigPoolSelector 2. Look at the 'oc describe kubeletconfig <configname>' output. 3. Actual results: The kubeletconfig does not apply to any of the machineconfigpools and shows this condition: ''' Conditions: Last Transition Time: 2020-09-17T21:00:06Z Message: Error: could not find any MachineConfigPool set for KubeletConfig Status: False Type: Failure ''' Expected results: The kubeletconfigs behavior should be consistent with the documentation. Either the docs should be updated to reflect the current behavior of the controller or the controller should be updated to match the described behavior in the docs. Additional info: [1] - https://docs.openshift.com/container-platform/4.5/rest_api/machine_apis/kubeletconfig-machineconfiguration-openshift-io-v1.html [2] - https://github.com/openshift/machine-config-operator/blob/master/pkg/controller/kubelet-config/kubelet_config_controller.go#L614-L615
This is expected behavior, we are in the process of updating and adding mco documentation. Please see https://github.com/openshift/machine-config-operator/blob/master/docs/KubeletConfigDesign.md#example as we do expect a pool for the KubeletConfig. You can follow along via the open mco documentation Jira Card here: https://issues.redhat.com/browse/GRPA-2248 which we hope to get completed soon. I have made an explicit note about this linking to this bug as well. Thanks for pointing this out!