Skip to content
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

imageset: do not use oc adm to get installer and cli images #896

Merged
merged 2 commits into from
Mar 26, 2020

Conversation

staebler
Copy link
Contributor

Instead of using oc adm, load the release image in a container and parse the installer and cli images from the image-references file.

@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 23, 2020
Add github.com/openshift/api/image in order to parse payload images
from the release image.
@staebler
Copy link
Contributor Author

Copy link
Contributor

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

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

This looks good, and far easier than what it looks like it would take to get the CA info into the list of trusted CAs for the pod(s) that need it.

@staebler staebler force-pushed the discover_images branch 3 times, most recently from 67b2c30 to 7c888ad Compare March 24, 2020 02:38
Copy link
Contributor

@dgoodwin dgoodwin left a comment

Choose a reason for hiding this comment

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

This is a great change @staebler.

return errors.Wrap(err, "unable to load release image-references")
}
if is.Kind != "ImageStream" || is.APIVersion != "image.openshift.io/v1" {
return errors.Wrap(err, "unrecognized image-references in release payload")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you confirm this works as far back as 4.1? We could have the discussion if not but it's a lot easier if we can just keep supporting 4.1.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. I will check on that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This worked with https://registry.svc.ci.openshift.org/v2/ocp/release/manifests/4.1.0-0.nightly-2020-03-21-052817. Testing did reveal a problem where the pull secret was not being used. I updated the code to add the pull secret to the pod spec.

Instead of using oc adm, load the release image in a container and
parse the installer and cli images from the image-references file.
@dgoodwin
Copy link
Contributor

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dgoodwin, staebler

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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

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