This is a complex process that involves some changes in multiple repositories and will affect multiple teams daily basis work. Make sure you have multiple reviewers from Core dev team which could guide you in the full process.
Preparing a release in Openshift/Hypershift repository
Bumping release version and generating Release Notes
The hypershift repo produces two different artifacts: Hypershift Operator (HO) and Control Plane Operator (CPO).
The CPO release lifecycle is dictated by the OCP release payload.
The HO has an independent release cadence. For consumer products:
- Our internal image build system builds from our latest commit in main several times a day.
- To roll out a new build we apply the following process:
- Create a git tag for the commit belonging to the image to be rolled out:
git co $commit-sha
git tag v0.1.1
- Push against remote.
- Generate release notes:
GITHUB_ACCESS_TOKEN=XXXX FROM=v0.1.0 TO=v0.1.1 make release
- Use the output to create the PR for bump the new image in the product gitOps repo. E.g.
This is a sample of how the release notes looks like added to the PR:
## area/control-plane-operator - [cpo: cno: follow image name change in release payload](https://github.com/openshift/hypershift/pull/2230) ## area/hypershift-operator - [Added documentation around supported-versions configmap](https://github.com/openshift/hypershift/pull/2220) - [Add comment for BaseDomainPrefix](https://github.com/openshift/hypershift/pull/2219) - [Add condition to NodePool indicating whether a security group for it is available](https://github.com/openshift/hypershift/pull/2216) - [HOSTEDCP-827: Add root volume encryption e2e test](https://github.com/openshift/hypershift/pull/2192) - [fix(hypershift): reduce CAPI rbac access](https://github.com/openshift/hypershift/pull/2173) - [Validate Network Input for HostedCluster](https://github.com/openshift/hypershift/pull/2215)
This change involves basically the OCP supported versions by Hypershift operator:
support/supportedversion/version.gowhich contains the variable called
LatestSupportedVersion. This one contains, as you can imagine, the Latest supported version. We need to put the new version here.
support/supportedversion/version_test.gocontains the tests for the to validate the Latest version. It should comply with the established contract to support 2 versions prior to the Latest.
We need also to modify some things manually in the Openshift/Release repo.
Preparing a release in Openshift/Release repository
ci-operator/step-registry/hypershift/ in the OCP release repo. In each file we will have a section called
from_image: overriding the current release version (E.G)
"4.11" to the new one
"4.12". You can check an example here:
Mirroring Images for CPO and HO
core-services/image-mirroring/hypershift/ we need to add a mapping file for each version we want to mirror. This is a sample of how it looks like this kind of file. This sample points to version
4.13 and the filename is
registry.ci.openshift.org/ocp/4.13:hypershift quay.io/hypershift/hypershift:4.13 registry.ci.openshift.org/ocp/4.13:hypershift-operator quay.io/hypershift/hypershift-operator:4.13 registry.ci.openshift.org/ocp-arm64/4.13:hypershift quay.io/hypershift/hypershift:4.13-arm64 quay.io/hypershift-arm64/hypershift:latest-arm64 registry.ci.openshift.org/ocp-arm64/4.13:hypershift-operator quay.io/hypershift/hypershift-operator:4.13-arm64
As you can see, the version is hardcoded but, what happens to the
registry.ci.openshift.org/ocp/4.14:hypershift quay.io/hypershift/hypershift:4.14 quay.io/hypershift/hypershift:latest registry.ci.openshift.org/ocp/4.14:hypershift-operator quay.io/hypershift/hypershift-operator:4.14 quay.io/hypershift/hypershift-operator:latest registry.ci.openshift.org/ocp-arm64/4.14:hypershift quay.io/hypershift/hypershift:4.14-arm64 quay.io/hypershift/hypershift:latest-arm64 registry.ci.openshift.org/ocp-arm64/4.14:hypershift-operator quay.io/hypershift/hypershift-operator:4.14-arm64 quay.io/hypershift/hypershift-operator:latest-arm64
We should create another file which contains the pointer to the
ci-operator/config/openshift/hypershift we need to focus in the
releases section. You need to modify the files in this manner (maybe more than one time in each file), (E.G) from
"4.11" bumping to
"4.12", in the nexts files:
Add new Presubmits jobs:
Delete the older Presubmits jobs with unsupported versions: