Opening this bug as it was originally opened as an RFE in the JIRA below but it was decided that this should be considered a bug instead. [RFE-674] Add yaml formatting check when configuration changes are added from file - Red Hat Issue Tracker URL: https://issues.redhat.com/browse/RFE-674 In this case, the following yaml has incorrect spacing but the MCO doesnt recognize the incorrect yaml and instead causes the resource to fail. issues adding a custom KubeletConfig: apiVersion: machineconfiguration.openshift.io/v1 kind: KubeletConfig metadata: name: worker-memory-kubeconfig spec: machineConfigPoolSelector: matchLabels: custom-kubelet: 'reserved-system-memory' kubeletConfig: systemReserved: cpu: 500m memory: 1Gi kubeReserved: cpu: 500m memory: 2Gi eviction-hard: cpu: 500m memory: 512Mi The crash is caused by incorrect formatting. Let me know if you need anything else from me.
So I see the original RFE was open against config and yaml checking and not the MCO. There's a few things to break down here: 1. There are multiple layers of validation. the first validator is at the api level, which can reject "bad" configs if either a) the parser itself rejects it, or b) the crd definition has fields to reject it Which seems like neither is the case. Now this is relatively low level checking which probably isn't going to be enough for most error cases 2. The second validator should be happening in the kubeletconfig. You say that this is causing a crash, which definitely shouldn't be happening. Could you attach the must-gather somewhere? What exactly is "crash"ing? Is it a panic somewhere? Given that this is the kubeletconfigcontroller, I will pass the to the node team for now. If it seems that it is instead the core MCO that is having trouble, feel free to move back.
*** This bug has been marked as a duplicate of bug 2041814 ***
The crash error is a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1975626. This issue which will be tracked by https://github.com/openshift/machine-config-operator/pull/3099.
*** This bug has been marked as a duplicate of bug 1975626 ***
*** This bug has been marked as a duplicate of bug 2076648 ***
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days