Description of problem: The standalone knmstate operator creates a PodDistruptionBudget with hardcoded minimal number of replicas set to 1. Due to that, it may not be able to perform upgrade on single-node-openshift clusters. Version-Release number of selected component (if applicable): 4.10 How reproducible: I did not get a chance to reproduce it, I just base it on missing code Steps to Reproduce: 1. Install nmstate on SNO 2. Attempt to upgrade it Actual results: Upgrade is blocked due to the PDB. The minimum number of replicas is hardcoded here: https://github.com/nmstate/kubernetes-nmstate/blob/main/controllers/operator/nmstate_controller.go#L194 Expected results: The minimal number of replicase should be dynamic and set to 0 on SNO. Similar to what was done in CNV's operator: https://github.com/kubevirt/cluster-network-addons-operator/blob/release-0.65/pkg/network/nmstate.go#L180 Additional info: This is a regression compared to the CNV operator
Before https://github.com/openshift/kubernetes-nmstate/pull/272/commits/da39a4d738c41b486f52d47b41dce9d2860f537c, KNO always deployed 2 instances of the webhook, even on SNO. That means that the upgrade issue was never present. The actual bug that this should track should be "nmstate deploys two instances of webhook even on a single-node cluster". That issue has been fixed by Christoph's PR. Apologies for misleading.
Double checked. There are no problems with operator update from older 4.11 version to the latest with 1 webhook pod instance.
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 (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069