Skip to content

Commit a9a1bbf

Browse files
authored
Merge pull request #65125 from mburke5678/applications-fix-errors-2
Applications fix errors 2
2 parents f03f3e3 + 25b79ab commit a9a1bbf

25 files changed

+219
-109
lines changed

applications/application-health.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ include::modules/application-health-configuring.adoc[leveloffset=+1]
2121

2222
include::modules/odc-monitoring-application-health-using-developer-perspective.adoc[leveloffset=+1]
2323

24+
// cannot add health checks in web console
25+
ifdef::openshift-rosa,openshift-dedicated[]
2426
include::modules/odc-adding-health-checks.adoc[leveloffset=+1]
27+
endif::openshift-rosa,openshift-dedicated[]
2528

2629
include::modules/odc-editing-health-checks.adoc[leveloffset=+1]
2730

applications/connecting_applications_to_services/binding-workloads-using-sbo.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ include::modules/sbo-unbinding-workloads-from-a-backing-service.adoc[leveloffset
4545
[id="additional-resources_binding-workloads-sbo"]
4646
== Additional resources
4747
* xref:../../applications/connecting_applications_to_services/understanding-service-binding-operator.adoc#binding-a-workload-together-with-a-backing-service_understanding-service-binding-operator[Binding a workload together with a backing service].
48-
* xref:../../applications/connecting_applications_to_services/getting-started-with-service-binding.adoc#connecting-the-spring-petclinic-sample-application-to-the-postgresql-database-service[Connecting the Spring PetClinic sample application to the PostgreSQL database service].
48+
* xref:../../applications/connecting_applications_to_services/getting-started-with-service-binding.adoc#sbo-connecting-spring-petclinic-sample-app-to-postgresql-database-service_getting-started-with-service-binding[Connecting the Spring PetClinic sample application to the PostgreSQL database service].
4949
* xref:../../operators/understanding/crds/crd-managing-resources-from-crds.adoc#crd-creating-custom-resources-from-file_crd-managing-resources-from-crds[Creating custom resources from a file]
5050
* link:https://redhat-developer.github.io/service-binding-operator/userguide/binding-workloads-using-sbo/custom-path-injection.html#_workload_resource_mapping[Example schema of the ClusterWorkloadResourceMapping resource].
51-

modules/application-health-about.adoc

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ metadata:
7575
labels:
7676
test: health-check
7777
name: my-application
78-
...
78+
# ...
7979
spec:
8080
containers:
8181
- name: goproxy-app <1>
@@ -86,7 +86,7 @@ spec:
8686
command: <5>
8787
- cat
8888
- /tmp/healthy
89-
...
89+
# ...
9090
----
9191

9292
<1> The container name.
@@ -104,7 +104,7 @@ metadata:
104104
labels:
105105
test: health-check
106106
name: my-application
107-
...
107+
# ...
108108
spec:
109109
containers:
110110
- name: goproxy-app <1>
@@ -124,7 +124,7 @@ spec:
124124
port: 8080 <9>
125125
failureThreshold: 30 <10>
126126
periodSeconds: 10 <11>
127-
...
127+
# ...
128128
----
129129

130130
<1> The container name.
@@ -148,7 +148,7 @@ metadata:
148148
labels:
149149
test: health-check
150150
name: my-application
151-
...
151+
# ...
152152
spec:
153153
containers:
154154
- name: goproxy-app <1>
@@ -163,7 +163,7 @@ spec:
163163
periodSeconds: 10 <6>
164164
successThreshold: 1 <7>
165165
failureThreshold: 3 <8>
166-
...
166+
# ...
167167
----
168168

169169
<1> The container name.
@@ -180,9 +180,12 @@ spec:
180180
----
181181
kind: Deployment
182182
apiVersion: apps/v1
183-
...
183+
metadata:
184+
labels:
185+
test: health-check
186+
name: my-application
184187
spec:
185-
...
188+
# ...
186189
template:
187190
spec:
188191
containers:
@@ -204,7 +207,7 @@ spec:
204207
periodSeconds: 10
205208
successThreshold: 1
206209
failureThreshold: 3
207-
...
210+
# ...
208211
----
209212
<1> The readiness probe.
210213
<2> The liveness probe.

modules/application-health-configuring.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ $ oc create -f <file-name>.yaml
9191
+
9292
[source,terminal]
9393
----
94-
$ oc describe pod health-check
94+
$ oc describe pod my-application
9595
----
9696
+
9797
.Example output

modules/deployments-ab-testing-lb.adoc

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,14 @@ $ oc edit route <route_name>
7676
.Example output
7777
[source,terminal]
7878
----
79-
...
79+
apiVersion: route.openshift.io/v1
80+
kind: Route
81+
metadata:
8082
metadata:
8183
name: route-alternate-service
8284
annotations:
8385
haproxy.router.openshift.io/balance: roundrobin
86+
# ...
8487
spec:
8588
host: ab-example.my-project.my-domain
8689
to:
@@ -91,7 +94,7 @@ spec:
9194
- kind: Service
9295
name: ab-example-b
9396
weight: 15
94-
...
97+
# ...
9598
----
9699

97100
[id="deployments-ab-testing-lb-web_{context}"]
@@ -212,6 +215,10 @@ Not all routers may support multiple or weighted backends.
212215
[source,terminal]
213216
----
214217
$ oc new-app openshift/deployment-example --name=ab-example-a --as-deployment-config=true --labels=ab-example=true --env=SUBTITLE\=shardA
218+
----
219+
+
220+
[source,terminal]
221+
----
215222
$ oc delete svc/ab-example-a
216223
----
217224
+
@@ -222,6 +229,10 @@ The application is deployed and a service is created. This is the first shard.
222229
[source,terminal]
223230
----
224231
$ oc expose deployment ab-example-a --name=ab-example --selector=ab-example\=true
232+
----
233+
+
234+
[source,terminal]
235+
----
225236
$ oc expose service ab-example
226237
----
227238

@@ -234,6 +245,10 @@ $ oc expose service ab-example
234245
$ oc new-app openshift/deployment-example:v2 \
235246
--name=ab-example-b --labels=ab-example=true \
236247
SUBTITLE="shard B" COLOR="red" --as-deployment-config=true
248+
----
249+
+
250+
[source,terminal]
251+
----
237252
$ oc delete svc/ab-example-b
238253
----
239254

modules/deployments-accessing-private-repos.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ You can add a secret to your `DeploymentConfig` object so that it can access ima
1212

1313
. Create a new project.
1414

15-
. From the *Workloads* page, create a secret that contains credentials for accessing a private image repository.
15+
. Navigate to *Workloads* -> *Secrets*.
16+
17+
. Create a secret that contains credentials for accessing a private image repository.
18+
19+
. Navigate to *Workloads* -> *DeploymentConfigs*.
1620

1721
. Create a `DeploymentConfig` object.
1822

modules/deployments-assigning-pods-to-nodes.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ a `Pod` template:
2323
----
2424
apiVersion: v1
2525
kind: Pod
26+
metadata:
27+
name: my-pod
28+
# ...
2629
spec:
2730
nodeSelector:
2831
disktype: ssd
29-
...
32+
# ...
3033
----
3134
+
3235
Pods created when the node selector is in place are assigned to nodes with the

modules/deployments-custom-strategy.adoc

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,22 @@ The custom strategy allows you to provide your own deployment behavior.
1010
.Example custom strategy definition
1111
[source,yaml]
1212
----
13-
strategy:
14-
type: Custom
15-
customParams:
16-
image: organization/strategy
17-
command: [ "command", "arg1" ]
18-
environment:
19-
- name: ENV_1
20-
value: VALUE_1
13+
kind: DeploymentConfig
14+
apiVersion: apps.openshift.io/v1
15+
metadata:
16+
name: example-dc
17+
# ...
18+
spec:
19+
# ...
20+
strategy:
21+
type: Custom
22+
customParams:
23+
image: organization/strategy
24+
command: [ "command", "arg1" ]
25+
environment:
26+
- name: ENV_1
27+
value: VALUE_1
28+
2129
----
2230

2331
In the above example, the `organization/strategy` container image provides the deployment behavior. The optional `command` array overrides any `CMD` directive specified in the image's `Dockerfile`. The optional environment variables provided are added to the execution environment of the strategy process.
@@ -42,18 +50,25 @@ Alternatively, use the `customParams` object to inject the custom deployment log
4250

4351
[source,yaml]
4452
----
45-
strategy:
46-
type: Rolling
47-
customParams:
48-
command:
49-
- /bin/sh
50-
- -c
51-
- |
52-
set -e
53-
openshift-deploy --until=50%
54-
echo Halfway there
55-
openshift-deploy
56-
echo Complete
53+
kind: DeploymentConfig
54+
apiVersion: apps.openshift.io/v1
55+
metadata:
56+
name: example-dc
57+
# ...
58+
spec:
59+
# ...
60+
strategy:
61+
type: Rolling
62+
customParams:
63+
command:
64+
- /bin/sh
65+
- -c
66+
- |
67+
set -e
68+
openshift-deploy --until=50%
69+
echo Halfway there
70+
openshift-deploy
71+
echo Complete
5772
----
5873

5974
This results in following deployment:

modules/deployments-exec-cmd-in-container.adoc

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,46 @@ You can add a command to a container, which modifies the container's startup beh
1414
+
1515
[source,yaml]
1616
----
17+
kind: DeploymentConfig
18+
apiVersion: apps.openshift.io/v1
19+
metadata:
20+
name: example-dc
21+
# ...
1722
spec:
18-
containers:
19-
- name: <container_name>
20-
image: 'image'
21-
command:
22-
- '<command>'
23-
args:
24-
- '<argument_1>'
25-
- '<argument_2>'
26-
- '<argument_3>'
23+
template:
24+
# ...
25+
spec:
26+
containers:
27+
- name: <container_name>
28+
image: 'image'
29+
command:
30+
- '<command>'
31+
args:
32+
- '<argument_1>'
33+
- '<argument_2>'
34+
- '<argument_3>'
2735
----
2836
+
2937
For example, to execute the `java` command with the `-jar` and `/opt/app-root/springboots2idemo.jar` arguments:
3038
+
3139
[source,yaml]
3240
----
41+
kind: DeploymentConfig
42+
apiVersion: apps.openshift.io/v1
43+
metadata:
44+
name: example-dc
45+
# ...
3346
spec:
34-
containers:
35-
- name: example-spring-boot
36-
image: 'image'
37-
command:
38-
- java
39-
args:
40-
- '-jar'
41-
- /opt/app-root/springboots2idemo.jar
47+
template:
48+
# ...
49+
spec:
50+
containers:
51+
- name: example-spring-boot
52+
image: 'image'
53+
command:
54+
- java
55+
args:
56+
- '-jar'
57+
- /opt/app-root/springboots2idemo.jar
58+
# ...
4259
----

modules/deployments-recreate-strategy.adoc

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,19 @@ The recreate strategy has basic rollout behavior and supports lifecycle hooks fo
1010
.Example recreate strategy definition
1111
[source,yaml]
1212
----
13-
strategy:
14-
type: Recreate
15-
recreateParams: <1>
16-
pre: {} <2>
17-
mid: {}
18-
post: {}
13+
kind: Deployment
14+
apiVersion: apps/v1
15+
metadata:
16+
name: hello-openshift
17+
# ...
18+
spec:
19+
# ...
20+
strategy:
21+
type: Recreate
22+
recreateParams: <1>
23+
pre: {} <2>
24+
mid: {}
25+
post: {}
1926
----
2027

2128
<1> `recreateParams` are optional.

0 commit comments

Comments
 (0)