You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pkg/operator/status: Drop kubelet skew guard, add RHEL guard
The kubelet skew guards are from 1471d2c (Bug 1986453: Check for
API server and node versions skew, 2021-07-27, #2658). But the Kube
API server also landed similar guards in
openshift/cluster-kube-apiserver-operator@9ce4f74775 (add
KubeletVersionSkewController, 2021-08-26,
openshift/cluster-kube-apiserver-operator#1199).
openshift/enhancements@0ba744e750 (eus-upgrades-mvp: don't enforce
skew check in MCO, 2021-04-29, openshift/enhancements#762) had shifted
the proposal form MCO-guards to KAS-guards, so I'm not entirely clear
on why the MCO guards landed at all. But it's convenient for me that
they did, because while I'm dropping them here, I'm recycling the Node
lister for a new check.
4.19 is dropping bare-RHEL support, and I want the Node lister to look
for RHEL entries like:
osImage: Red Hat Enterprise Linux 8.6 (Ootpa)
but we are ok with RHCOS entries like:
osImage: Red Hat Enterprise Linux CoreOS 419.96.202503032242-0
coStatus.Message=fmt.Sprintf("One or more nodes have an unsupported kubelet version skew. Please see `oc get nodes` for details and upgrade all nodes so that they have a kubelet version of at least %v.", getMinimalSkewSupportNodeVersion(kubeAPIServerVersion))
585
-
returnskewUnsupported, coStatus, nil
586
-
}
587
-
ifnodeMinorVersion+2==kubeAPIServerMinorVersion {
588
-
coStatus.Reason=skewPresent
589
-
coStatus.Message=fmt.Sprintf("Current kubelet version %v will not be supported by newer kube-apiserver. Please upgrade the kubelet first if plan to upgrade the kube-apiserver", kubeletVersion)
590
-
returnskewPresent, coStatus, nil
591
-
}
592
-
}
593
-
ifkubeletVersion=="" {
594
-
err=fmt.Errorf("kubelet does not yet have a version")
595
-
coStatus.Reason=skewUnchecked
596
-
coStatus.Message=fmt.Sprintf("An error occurred when checking kubelet version skew: %v", err.Error())
597
-
returnskewUnchecked, coStatus, err
598
523
}
599
-
iflastError!=nil {
600
-
coStatus.Reason=skewUnchecked
601
-
coStatus.Message=fmt.Sprintf("An error occurred when checking kubelet version skew: %v", err)
602
-
returnskewUnchecked, coStatus, lastError
524
+
sort.Strings(rhelNodes)
525
+
iflen(rhelNodes) >0 {
526
+
coStatus.Status=configv1.ConditionFalse
527
+
coStatus.Reason="RHELNodes"
528
+
coStatus.Message=fmt.Sprintf("%s RHEL nodes, including %s, but OpenShift 4.19 requires RHCOS https://FIXME-DOC-LINK", len(rhelNodes), rhelNodes[0])
603
529
}
604
-
returnskewSupported, coStatus, nil
530
+
returncoStatus, nil
605
531
}
606
532
607
533
// GetAllManagedNodes returns the nodes managed by MCO
0 commit comments