Skip to content

Conversation

@cgwalters
Copy link
Member

@cgwalters cgwalters commented Mar 16, 2021

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 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.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 16, 2021
@openshift-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@cgwalters
Copy link
Member Author

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 installer image in the release image is installing manifests. Does that make sense to everyone?

@staebler
Copy link
Contributor

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 installer image in the release image is installing manifests. Does that make sense to everyone?

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 io.openshift.release.operator=true label for CVO to consider its manifests.

@staebler
Copy link
Contributor

Per discussion, the real fix here will probably require adding minimal CVO bits to the installer image.

Did you need the temporary fix in order to unblock something? Or can we do the real fix from the start?

@cgwalters cgwalters force-pushed the stream-metadata-configmap branch from c32758d to bc01a06 Compare March 16, 2021 19:10
@cgwalters cgwalters marked this pull request as ready for review March 16, 2021 19:11
@cgwalters
Copy link
Member Author

Did you need the temporary fix in order to unblock something? Or can we do the real fix from the start?

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.

@cgwalters cgwalters changed the title WIP: Inject CoreOS stream metadata as configmap Inject CoreOS stream metadata as configmap via CVO manifest Mar 16, 2021
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 16, 2021
@cgwalters cgwalters force-pushed the stream-metadata-configmap branch 2 times, most recently from 4224981 to d8659d4 Compare March 16, 2021 19:24
@cgwalters
Copy link
Member Author

Copy link
Contributor

@staebler staebler left a 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.

Comment on lines 8 to 10
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See
https://github.com/openshift/enhancements/blob/master/enhancements/update/cluster-profiles.md

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.

Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Member Author

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!

@cgwalters cgwalters force-pushed the stream-metadata-configmap branch from d8659d4 to dd1326b Compare March 17, 2021 13:46
@cgwalters
Copy link
Member Author

Any further thoughts on this?

cgwalters added a commit to cgwalters/origin that referenced this pull request Mar 19, 2021
@cgwalters
Copy link
Member Author

openshift/origin#25993 is a quick sanity test for this that can merge after this does.

cgwalters added a commit to cgwalters/origin that referenced this pull request Mar 19, 2021
@cgwalters
Copy link
Member Author

/test e2e-gcp
/test e2e-azure

@staebler
Copy link
Contributor

Any further thoughts on this?

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.
@cgwalters cgwalters force-pushed the stream-metadata-configmap branch from dd1326b to 260b21c Compare March 25, 2021 13:28
@cgwalters
Copy link
Member Author

Rebased 🏄

Copy link
Contributor

@staebler staebler left a 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
Copy link
Contributor

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?

@staebler
Copy link
Contributor

/retest

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 25, 2021
@openshift-ci-robot
Copy link
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 25, 2021
@cgwalters
Copy link
Member Author

/test e2e-aws-upgrade

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 26, 2021

@cgwalters: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-azure dd1326baddbfbe2aabaaf2b7b7a5e77e0c5d6aa9 link /test e2e-azure
ci/prow/e2e-aws-workers-rhel7 260b21c link /test e2e-aws-workers-rhel7
ci/prow/e2e-crc 260b21c link /test e2e-crc

Full PR test history. Your PR dashboard.

Details

Instructions 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.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 516bf4e into openshift:master Mar 26, 2021
cgwalters added a commit to cgwalters/origin that referenced this pull request Mar 26, 2021
cgwalters added a commit to cgwalters/origin that referenced this pull request Mar 26, 2021
ironcladlou added a commit to ironcladlou/hypershift that referenced this pull request May 4, 2021
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.
ironcladlou added a commit to ironcladlou/hypershift that referenced this pull request May 4, 2021
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.
ironcladlou added a commit to ironcladlou/hypershift that referenced this pull request May 5, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants