Description of problem:
When the 'cluster-monitoring-config' config map is updated to something that can't be parsed by CMO, the operator will log an error but it will use the default configuration, potentially reverting previous customization.
Version-Release number of selected component (if applicable):
4.4 but the same is true for earlier versions
Steps to Reproduce:
1. Enable user workload monitoring as described in the 4.3 docs.
2. Edit the 'cluster-monitoring-config' config map to the following:
No more pods running in the user-workload-monitoring namespace.
CMO shouldn't do anything.
Invalid CMO config should trigger an alert.
Test with 4.5.0-0.nightly-2020-04-02-195956, set invalid value in cluster-monitoring-config confimap, there is error in cluster-monitoring-operator pod and trigger ClusterMonitoringOperatorReconciliationErrors/ClusterOperatorDegraded/ClusterOperatorDown alerts, no resource is created under openshift-user-workload-monitoring
# oc -n openshift-monitoring logs cluster-monitoring-operator-876444cb8-vfzrc -c cluster-monitoring-operator| tail
E0403 08:31:39.424739 1 operator.go:273] sync "openshift-monitoring/cluster-monitoring-config" failed: the Cluster Monitoring ConfigMap could not be parsed: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go struct field UserWorkloadConfig.techPreviewUserWorkload.enabled of type bool
I0403 08:31:39.424851 1 operator.go:298] Updating ClusterOperator status to failed. Err: the Cluster Monitoring ConfigMap could not be parsed: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go struct field UserWorkloadConfig.techPreviewUserWorkload.enabled of type bool
# oc -n openshift-user-workload-monitoring get pod
No resources found in openshift-user-workload-monitoring namespace.
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, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.