Commit 3d073fe
committed
install: Annotate HyperShift bootstrap manifests with include.release.openshift.io/hypershift-bootstrap
HyperShift currently massages release-image manifests [1] and then
applies the ones it expects the cluster-version operator to need [2]
in order to get that Deployment running. That can cause problems like
installing the v1alpha1 clusterversionoperators.operator.openshift.io
[3] when HyperShift is using filename-based logic and assuming the
remaining manifests are all necessary to bootstrap the CVO [2]:
oc apply -f /var/payload/manifests
With this commit, I'm adding the
include.release.openshift.io/hypershift-bootstrap annotation to the
manifests we actually need for HyperShift bootstrapping, to allow the
HyperShift operator to move to something like:
oc create -f $(grep -rl include.release.openshift.io/hypershift-bootstrap /var/payload/manifests)
For the two manifests we maintain locally, I've added the grep target
as an annotation.
We need the ClusterVersion CustomResourceDefinition in place too, see
7480a5f (Get cluster version object earlier in startup, 2022-03-11, #741).
But we are unlikely to need any fancy feature-gated knobs in the
ClusterVersion CRD just to get the CVO going. So with this commit I'm
appending a YAML comment with the grep target to the Default CRD, and
the expectation is that:
1. The bootstrapping creates the Default ClusterVersion CRD.
2. The HyperShift control-plane operator populates it with enough to
get the initial CVO running (e.g. spec.capabilities to exclude some
capabilities, because once installed, capabilities cannot be
uninstalled [4]).
3. CVO comes up, reads in the initial CluserVersion and FeatureGate
and whatever else it needs, and if necessary, updates the
ClusterVersion CRD.
4. HyperShift populates any feature-gated ClusterVersion knobs, now
that those slots exist.
5. Post-install cluster lifecycle continues to have the CVO managing
its own resources in the cluster, no more need for HyperShift
bootstrapping.
It would be elegant to have the new grep target as an annotation in
the CVO, but for a flag of such limited utility, finding a way to
reliably inject it from the Dockerfile seems like more trouble than it
would be worth, which is why I'm using the YAML comment approach.
[1]: https://github.com/openshift/hypershift/blob/a85cd0a7ed067748f74a7869955ebd05a01912b8/control-plane-operator/controllers/hostedcontrolplane/v2/cvo/deployment.go#L205-L241
[2]: https://github.com/openshift/hypershift/blob/a85cd0a7ed067748f74a7869955ebd05a01912b8/control-plane-operator/controllers/hostedcontrolplane/v2/assets/cluster-version-operator/deployment.yaml#L89-L104
[3]: #1282 (comment)
[4]: https://github.com/openshift/enhancements/blob/2b38513b8661632f08e64f4acc3b856e842f8669/enhancements/installer/component-selection.md#capabilities-cannot-be-uninstalled1 parent eaf28f5 commit 3d073fe
3 files changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
0 commit comments