forked from openshift/installer
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: pkg/rhcos/updatepayload: Extract RHCOS build from update payload
Since e2b31b2 (bootkube: Supply machine-os-content to MCO, 2019-01-29, openshift#1149), we have been using the machine-os-content image to seed the machine-config operator. With this commit, use the RHCOS build ID from that image's annotations to calculate our AMI, etc. as well. This gives one less degree of freedom for breaking things ;). Users who want to test clusters based on a different RHCOS build should bump the value in their update payload, just like users testing operator updates and other changes. This is a WIP until I look into signature verification.
- Loading branch information
Showing
8 changed files
with
226 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Package release contains assets for the release image (also known | ||
// as the update payload). | ||
package release | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/sirupsen/logrus" | ||
|
||
"github.com/openshift/installer/pkg/asset" | ||
) | ||
|
||
var ( | ||
defaultReleaseImage = "registry.svc.ci.openshift.org/openshift/origin-release:v4.0" | ||
) | ||
|
||
// Release is the pull-spec for the release image. | ||
type Release string | ||
|
||
var _ asset.Asset = (*Release)(nil) | ||
|
||
// Name returns the human-friendly name of the asset. | ||
func (i *Release) Name() string { | ||
return "Release" | ||
} | ||
|
||
// Dependencies returns no dependencies. | ||
func (i *Release) Dependencies() []asset.Asset { | ||
return nil | ||
} | ||
|
||
// Generate the release image. | ||
func (r *Release) Generate(p asset.Parents) error { | ||
releaseImage := defaultReleaseImage | ||
if ri := os.Getenv("OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE"); ri != "" { | ||
logrus.Warn("Found override for ReleaseImage. Please be warned, this is not advised") | ||
releaseImage = ri | ||
} | ||
*r = Release(releaseImage) | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.