Skip to content

Commit d49c81a

Browse files
authored
Merge pull request #30822 from sagidlow/ISSUE-29111
ISSUE-29111 Updated code to include missing label
2 parents efce1f3 + cdf05ee commit d49c81a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

modules/deployments-ab-testing-lb.adoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ Not all routers may support multiple or weighted backends.
205205
+
206206
[source,terminal]
207207
----
208-
$ oc new-app openshift/deployment-example --name=ab-example-a
208+
$ oc new-app openshift/deployment-example --name=ab-example-a --as-deployment-config=true --labels=ab-example=true --env=SUBTITLE\=shardA
209+
$ oc delete svc/ab-example-a
209210
----
210211
+
211212
The application is deployed and a service is created. This is the first shard.
@@ -214,18 +215,20 @@ The application is deployed and a service is created. This is the first shard.
214215
+
215216
[source,terminal]
216217
----
217-
$ oc expose svc/ab-example-a --name=ab-example
218+
$ oc expose deploymentconfig ab-example-a --name=ab-example --selector=ab-example\=true
219+
$ oc expose service ab-example
218220
----
219221

220-
. Browse to the application at `ab-example-<project>.<router_domain>` to verify you see the `v1` image.
222+
. Browse to the application at `ab-example-<project_name>.<router_domain>` to verify you see the `v1` image.
221223

222224
. Create a second shard based on the same source image and label as the first shard, but with a different tagged version and unique environment variables:
223225
+
224226
[source,terminal]
225227
----
226228
$ oc new-app openshift/deployment-example:v2 \
227229
--name=ab-example-b --labels=ab-example=true \
228-
SUBTITLE="shard B" COLOR="red"
230+
SUBTITLE="shard B" COLOR="red" --as-deployment-config=true
231+
$ oc delete svc/ab-example-b
229232
----
230233

231234
. At this point, both sets of pods are being served under the route. However, because both browsers (by leaving a connection open) and the router (by default, through a cookie) attempt to preserve your connection to a back-end server, you might not see both shards being returned to you.

0 commit comments

Comments
 (0)