Skip to content

Commit d5e5a1b

Browse files
NO-JIRA: add optional step for creating release image using cluster bot and multiple prs
1 parent 1bb8b1a commit d5e5a1b

File tree

1 file changed

+31
-9
lines changed

1 file changed

+31
-9
lines changed

HACKING.md

+31-9
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,42 @@ What do I need to do to test...
3535

3636
$ bin/hypershift-operator run
3737

38-
### How to install HyperShift with a custom image
38+
### Building Custom Images
39+
To build images that can be both used for HyperShift installation and Hosted Cluster creation
40+
41+
docker build -f ./Dockerfile.dev --platform=linux/amd64 -t quay.io/blah/hypershift:${TAG} .
42+
docker push quay.io/blah/hypershift:${TAG}
43+
44+
45+
To build only the HyperShift image for installation
46+
47+
make IMG=quay.io/my/hypershift:latest docker-build docker-push
48+
49+
50+
To build controlplane-operator image for Hosted Cluster creation
51+
52+
docker build --platform linux/amd64 -t quay.io/blah/controlplaneoperator:<tag> -f Dockerfile.control-plane .
53+
docker push docker push quay.io/blah/controlplaneoperator:<tag>
3954

40-
1. Build and push a custom image build to your own repository.
4155

42-
make IMG=quay.io/my/hypershift:latest docker-build docker-push
56+
(Optional) If you need to build a release image containing changes from multiple pull requests you can do so by using Cluster Bot in slack.
57+
For example to build a 4.18 release image using the below PRs as examples
58+
* https://github.com/openshift/cluster-storage-operator/pull/522
59+
* https://github.com/openshift/hypershift/pull/4791
4360

44-
2. Install HyperShift using the custom image:
61+
Run the following in Cluster Bot
62+
63+
build 4.18,openshift/cluster-storage-operator#522,openshift/hypershift#4791
64+
65+
The bot will build a release image and link the job that created it, the image can be found at the bottom of the logs.
66+
67+
68+
### How to install HyperShift with a custom image
69+
1. Install HyperShift using the custom image:
4570

4671
$ bin/hypershift install --hypershift-image quay.io/my/hypershift:latest
4772

48-
3. (Optional) If your repository is private, create a secret:
73+
2. (Optional) If your repository is private, create a secret:
4974

5075
oc create secret generic hypershift-operator-pull-secret -n hypershift --from-file=.dockerconfig=/my/pull-secret --type=kubernetes.io/dockerconfig
5176

@@ -54,10 +79,7 @@ What do I need to do to test...
5479
oc patch serviceaccount operator -n hypershift -p '{"imagePullSecrets": [{"name": "hypershift-operator-pull-secret"}]}'
5580

5681
### How to create a HyperShift Guest Cluster with a custom image
57-
58-
1. Build and push a custom release image to your own repository.
59-
60-
2. Create a guest cluster using the custom image:
82+
1. Create a guest cluster using the custom image:
6183

6284
$ bin/hypershift create cluster openstack --release-image quay.io ...
6385

0 commit comments

Comments
 (0)