Commit 0c04d51
committed
hypershift-operator/controllers/hostedcluster: isUpgradeable minor-bump scoping
Godocs for Upgradeable [1]:
Upgradeable indicates whether the component (operator and all
configured operands) is safe to upgrade based on the current cluster
state. When Upgradeable is False, the cluster-version operator will
prevent the cluster from performing impacted updates unless forced.
When set on ClusterVersion, the message will explain which updates
(minor or patch) are impacted. When set on ClusterOperator, False
will block minor OpenShift updates. The message field should contain
a human readable description of what the administrator should do to
allow the cluster or component to successfully update. The
cluster-version operator will allow updates when this condition is
not False, including when it is missing, True, or Unknown.
So we specifically doc it as only about 4.y -> 4.(y+1) minor updates
when seen on ClusterOperator. But we leave it unclear on
ClusterVersion because when you set some ClusterVersion overrides, it
can break patch updates, so QE asked us to also block patch updates in
that case [2,3].
With this patch, I'm using availableUpdates and conditionalUpdates to
look up a version associated with the proposed target release
pullspec. That's a bit less reliable than the current cluster-version
operator behavior, which is extracting the proposed target version
from the proposed release image itself (e.g. see [4]). But it's
probably sufficient for now, with the odds that the OpenShift Update
Service serves bad data low. And we can refine further in the future
if we want.
[1]: https://github.com/openshift/api/blob/cce310ad2932f6de24491052d506926e484c082c/config/v1/types_cluster_operator.go#L179-L190 :
[2]: openshift/cluster-version-operator#364
[3]: https://bugzilla.redhat.com/show_bug.cgi?id=1822844
[4]: openshift/cluster-version-operator#4311 parent a0377ae commit 0c04d51
File tree
1 file changed
+30
-0
lines changed- hypershift-operator/controllers/hostedcluster
1 file changed
+30
-0
lines changedLines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4214 | 4214 | | |
4215 | 4215 | | |
4216 | 4216 | | |
| 4217 | + | |
| 4218 | + | |
| 4219 | + | |
| 4220 | + | |
| 4221 | + | |
| 4222 | + | |
| 4223 | + | |
| 4224 | + | |
| 4225 | + | |
| 4226 | + | |
| 4227 | + | |
| 4228 | + | |
| 4229 | + | |
| 4230 | + | |
| 4231 | + | |
4217 | 4232 | | |
4218 | 4233 | | |
4219 | 4234 | | |
4220 | 4235 | | |
| 4236 | + | |
| 4237 | + | |
| 4238 | + | |
| 4239 | + | |
| 4240 | + | |
| 4241 | + | |
| 4242 | + | |
| 4243 | + | |
| 4244 | + | |
| 4245 | + | |
| 4246 | + | |
| 4247 | + | |
| 4248 | + | |
| 4249 | + | |
| 4250 | + | |
4221 | 4251 | | |
4222 | 4252 | | |
4223 | 4253 | | |
| |||
0 commit comments