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
report release image version in clusterdeployment status #1278
report release image version in clusterdeployment status #1278
Conversation
// ReleaseVersion is the version of OpenShift as reported by the release image | ||
// resolved for the installation. | ||
// +optional | ||
ReleaseVersion *string `json:"releaseVersion,omitempty"` |
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 ReleaseVersion sufficiently differentiated from the clusters current version? Maybe "is the initial version of OpenShift that was installed, as reported..." would help a little.
Would InstallVersion or InstallReleaseVersion be better? InitialReleaseVersion?
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.
used InstallVersion
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.
@dgoodwin used InstallVersion
to be clear that this version was reported for installation
@@ -250,3 +270,20 @@ func getClient(kubeConfig *rest.Config) (client.Client, error) { | |||
} | |||
return kubeClient, nil | |||
} | |||
|
|||
// cincinnatiMetadata is the compact version of the release metadata as | |||
// as stored by the release-image generator in [1]. |
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.
"as as"
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.
done
name string | ||
name string | ||
images map[string]string | ||
version string |
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.
I was tempted to request an e2e test for this, but as implemented the job will fail if something is wrong, so in theory we're already getting coverage that this code works. I'm not sure we'd want to assert specific versions in the e2e test anyhow.
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.
The test was testing there are on errors and not the actual values and as you said it already covers testing the release version code path..
The release image today include the metadata (cincinatti metadata) for version information in release-metadata file, see [1]. The update-installer-image job today reads the release image contents and then extracts images for installer and cli for each cluster deployment. Since it already interacts with release image once per cluster deployment, it seems like the right place to also include code to extract and report the release image version. - the install image set job init container now copies /release-image/release-metadata file in additions to the image-references file. - the update-installer-image command reads this release-metadata file and reports the version to the status like the installer, cli images. NOTE: oc uses the release metadata to get the version field and fallback to image stream name from the image-references [2] and update-installer-image keeps the same behavior. [1]: https://github.com/openshift/oc/blob/c66c03f3012a10f16eb86fdce6330433adf6c9ee/pkg/cli/admin/release/info.go#L787 [2]: https://github.com/openshift/oc/blob/c66c03f3012a10f16eb86fdce6330433adf6c9ee/pkg/cli/admin/release/info.go#L718-L723
cf47fe4
to
b7cdf9e
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, dgoodwin 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 |
The release image today include the metadata (cincinatti metadata) for version
information in release-metadata file, see 1.
The update-installer-image job today reads the release image contents and then
extracts images for installer and cli for each cluster deployment. Since it already
interacts with release image once per cluster deployment, it seems like the right place
to also include code to extract and report the release image version.
the install image set job init container now copies /release-image/release-metadata file
in additions to the image-references file.
the update-installer-image command reads this release-metadata file and reports the version
to the status like the installer, cli images.
NOTE: oc uses the release metadata to get the version field and fallback to image stream name
from the image-references 2 and update-installer-image keeps the same behavior.
xref: https://issues.redhat.com/browse/HIVE-1350
/assign @dgoodwin