Skip to content

Commit c33f98f

Browse files
committed
OCPBUGS-55425: Make the description for the docker build up to date with up to date files, update the file name of the example CO manifest referenced in the how to steps
1 parent b6949a5 commit c33f98f

File tree

2 files changed

+8
-24
lines changed

2 files changed

+8
-24
lines changed

README.md

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,16 @@ OS_DEBUG=true OS_BUILD_PLATFORMS=linux/amd64 make
169169
# note that you can build for mulitiple platforms with:
170170
make build-cross
171171
```
172-
But the `make` step is included in the `Dockerfile`, so this does not need to be done manually.
173-
You can instead simply build the container image and push the it to your own registry:
172+
But the build step is included in the `Dockerfile.rhel7`, so this does not need to be done manually.
173+
You can instead simply build the container image and push it to your own registry:
174174

175175
```bash
176176
# the pattern is:
177-
docker build -t <registry>/<your-username>/console-operator:<version> .
178-
# following: docker.io/openshift/origin-console-operator:latest
177+
docker build -f Dockerfile.rhel7 -t <registry>/<your-username>/console-operator:<version>
178+
# conforming to: docker.io/openshift/origin-console-operator:latest
179179
# for development, you are going to push to an alternate registry.
180-
# specifically it can look something like this:
181-
docker build -f Dockerfile.rhel7 -t quay.io/benjaminapetersen/console-operator:latest .
182180
```
183-
You can optionally build a specific version.
181+
Note: If you are running on macOS, you need to pass the --platform linux/amd64 flag to the Docker build command.
184182

185183
Then, push your image:
186184

@@ -189,30 +187,16 @@ docker push <registry>/<your-username>/console-operator:<version>
189187
# Be sure your repository is public else the image will not be able to be pulled later
190188
docker push quay.io/benjaminapetersen/console-operator:latest
191189
```
192-
Then, you will want to deploy your new container. This means duplicating the `manifests/07-operator.yaml`
193-
and updating the line `image: docker.io/openshift/origin-console-operator:latest` to instead use the
194-
image you just pushed.
195-
196-
```bash
197-
# duplicate the operator manifest to /examples or your ~/ home dir
198-
cp manifests/07-operator.yaml ~/07-operator-alt-image.yaml
199-
```
200-
Then, update the image & replicas in your `07-operator-alt-image.yaml` file:
190+
Then, you will want to deploy your new container to the cluster. This can be done by updating the `image` field in the `example/07-operator.yaml` file to instead use the image you just pushed:
201191

202192
```yaml
203193
# before
204-
replicas: 2
205194
image: docker.io/openshift/origin-console-operator:latest
206195
# after
207196
# image: <registry>/<your-username>/console-operator:<version>
208-
replicas: 1
209197
image: quay.io/benjaminapetersen/console-operator:latest
210198
```
211-
And ensure that the `imagePullPolicy` is still `Always`. This will ensure a fast development feedback loop.
212-
213-
```yaml
214-
imagePullPolicy: Always
215-
```
199+
Note: To guarantee a fast development feedback loop make sure the `imagePullPolicy` is set to `Always`.
216200

217201
#### Deploying
218202

examples/07-operator-alt-image.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
# docker build quay.io/<your-user>/console-operator:latest .
2222
# docker push quay.io/<your-user>/console-operator:latest
2323
# then
24-
# oc apply -f examples/05-operator-alt-image.yaml
24+
# oc apply -f examples/07-operator-alt-image.yaml
2525
# with this line updated:
2626
image: quay.io/<your-user>/console-operator:latest
2727
ports:

0 commit comments

Comments
 (0)