-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Inject CoreOS stream metadata as configmap via CVO manifest #4760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inject CoreOS stream metadata as configmap via CVO manifest #4760
Conversation
|
Skipping CI for Draft Pull Request. |
|
OK so I believe that basically what this commit needs to do is what's in https://github.com/cgwalters/rhel-coreos-bootimages - basically. This would be the first time that the |
My understanding is that we need the ConfigMap added under the manifests directory in the installer image that is included in the release. The installer image may also need the |
Did you need the temporary fix in order to unblock something? Or can we do the real fix from the start? |
c32758d to
bc01a06
Compare
I think this latest code will work - it was pretty easy to copy over the approach from https://github.com/cgwalters/rhel-coreos-bootimages . If it does work we'll see it in the CI artifacts. |
4224981 to
d8659d4
Compare
|
https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/pr-logs/pull/openshift_installer/4760/pull-ci-openshift-installer-master-e2e-aws/1371905428375474176/artifacts/e2e-aws/gather-extra/artifacts/oc_cmds/configmaps has 🎉 |
staebler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. I just have a couple questions for things that are not clear to me, since operator manifests are a new experience for me.
manifests/coreos-bootimages.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you happen to have a reference for what these annotations signify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Admittedly I cargo culted these from the MCO; we want this data in all of them I think. It's not directly relevant for e.g. single-node-developer but it also doesn't do anything and it's tiny.
manifests/coreos-bootimages.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something that is automatically updated by the CVO or by the release tooling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's replaced by oc adm release new yep.
hack/build-coreos-manifest.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there some reason why you don't want to have the type here be corev1.ConfigMap? If it were, then we would get type safety later when filling out the data and not have to do any casting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the original repo I wasn't vendoring anything, it was basically just a git repo with a JSON file, so adding all the kube stuff to vendor/ felt like overkill.
But here, we're already vendoring, so indeed - fixed!
d8659d4 to
dd1326b
Compare
|
Any further thoughts on this? |
This validates openshift/installer#4760 until we have an in-cluster consumer.
|
openshift/origin#25993 is a quick sanity test for this that can merge after this does. |
This validates openshift/installer#4760 until we have an in-cluster consumer.
|
/test e2e-gcp |
Sorry, I lost track of this. I'll take another look at this PR and the dependent PR early next week. From the last time I looked at it, it looked generally good, save for maybe a few nits. |
Split out from openshift#4582 This copies the bits from https://github.com/cgwalters/rhel-coreos-bootimages which builds a ConfigMap out of the stream metadata and injects it into the cluster. We have an `installer` image in the release image today; this adds the "is an operator" label, even though it's not really an operator. We just want the CVO to inject the manifest. Among other important semantics, this will ensure that in-place cluster upgrades that have new pinned CoreOS stream data will have this configmap updated.
dd1326b to
260b21c
Compare
|
Rebased 🏄 |
staebler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit that we can leave.
/lgtm
| WORKDIR /go/src/github.com/openshift/installer | ||
| COPY . . | ||
| RUN hack/build.sh | ||
| RUN go run -mod=vendor hack/build-coreos-manifest.go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is -mod=vendor necessary here since we are using go 1.15?
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: staebler The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test e2e-aws-upgrade |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
@cgwalters: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
This validates openshift/installer#4760 until we have an in-cluster consumer.
This validates openshift/installer#4760 until we have an in-cluster consumer.
Before this commit, CoreOS metadata was hard-coded in this Git repo and required manual maintenance to map OCP release versions to compatible AMIs. Now, the metadata is discovered automatically as part of the general release image metadata lookup, as the CoreOS metadata is part of the payload as of openshift/installer#4760. After this commit, HyperShift will only be compatible with OCP release images which embed the CoreOS metadata.
Before this commit, CoreOS metadata was hard-coded in this Git repo and required manual maintenance to map OCP release versions to compatible AMIs. Now, the metadata is discovered automatically as part of the general release image metadata lookup, as the CoreOS metadata is part of the payload as of openshift/installer#4760. After this commit, HyperShift will only be compatible with OCP release images which embed the CoreOS metadata.
Before this commit, CoreOS metadata was hard-coded in this Git repo and required manual maintenance to map OCP release versions to compatible AMIs. Now, the metadata is discovered automatically as part of the general release image metadata lookup, as the CoreOS metadata is part of the payload as of openshift/installer#4760. After this commit, HyperShift will only be compatible with OCP release images which embed the CoreOS metadata.
Split out from #4582
This copies the bits from https://github.com/cgwalters/rhel-coreos-bootimages
which builds a ConfigMap out of the stream metadata and injects
it into the cluster.
We have an
installerimage in the release image today; this addsthe "is an operator" label, even though it's not really an
operator. We just want the CVO to inject the manifest.
Among other important semantics, this will ensure that in-place
cluster upgrades that have new pinned CoreOS stream data will
have this configmap updated.