Skip to content

Commit 5ea53ac

Browse files
0xmichalisadellape
authored andcommitted
Document mid lifecycle hooks
1 parent 619e054 commit 5ea53ac

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

dev_guide/deployments.adoc

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,31 +48,31 @@ following is an example of a `*deploymentConfig*` resource:
4848
----
4949
kind: "DeploymentConfig"
5050
apiVersion: "v1"
51-
metadata:
51+
metadata:
5252
name: "frontend"
53-
spec:
53+
spec:
5454
template: <1>
55-
metadata:
56-
labels:
55+
metadata:
56+
labels:
5757
name: "frontend"
58-
spec:
59-
containers:
58+
spec:
59+
containers:
6060
- name: "helloworld"
6161
image: "openshift/origin-ruby-sample"
62-
ports:
62+
ports:
6363
- containerPort: 8080
6464
protocol: "TCP"
6565
replicas: 5 <2>
66-
selector:
66+
selector:
6767
name: "frontend"
68-
triggers:
68+
triggers:
6969
- type: "ConfigChange" <3>
7070
- type: "ImageChange" <4>
71-
imageChangeParams:
71+
imageChangeParams:
7272
automatic: true
73-
containerNames:
73+
containerNames:
7474
- "helloworld"
75-
from:
75+
from:
7676
kind: "ImageStreamTag"
7777
name: "origin-ruby-sample:latest"
7878
strategy: <5>
@@ -239,7 +239,7 @@ The following is an example of a ConfigChange trigger:
239239
240240
[source,yaml]
241241
----
242-
triggers:
242+
triggers:
243243
- type: "ConfigChange"
244244
----
245245
====
@@ -256,14 +256,14 @@ The following is an example of an ImageChange trigger:
256256
257257
[source,json]
258258
----
259-
triggers:
259+
triggers:
260260
- type: "ImageChange"
261-
imageChangeParams:
261+
imageChangeParams:
262262
automatic: true <1>
263-
from:
263+
from:
264264
kind: "ImageStreamTag"
265265
name: "origin-ruby-sample:latest"
266-
containerNames:
266+
containerNames:
267267
- "helloworld"
268268
----
269269
<1> If the `*automatic*` option is set to `false`, the trigger is disabled.
@@ -383,17 +383,19 @@ strategy:
383383
type: Recreate
384384
recreateParams: <1>
385385
pre: {} <2>
386+
mid: {}
386387
post: {}
387388
----
388389
389390
<1> `*recreateParams*` are optional.
390-
<2> `*pre*` and `*post*` are both xref:lifecycle-hooks[lifecycle hooks].
391+
<2> `*pre*`, `*mid*`, and `*post*` are both xref:lifecycle-hooks[lifecycle hooks].
391392
====
392393

393394
The Recreate strategy will:
394395

395396
. Execute any "pre" lifecycle hook.
396397
. Scale down the previous deployment to zero.
398+
. Execute any "mid" lifecycle hook.
397399
. Scale up the new deployment.
398400
. Execute any "post" lifecycle hook.
399401

@@ -402,8 +404,6 @@ than one, the first replica of the deployment will be validated for readiness
402404
before fully scaling up the deployment. If the validation of the first replica
403405
fails, the deployment will be considered a failure.
404406

405-
IMPORTANT: When executing the "post" lifecycle hook, all failures will be
406-
ignored regardless of the failure policy specified on the hook.
407407

408408
[[custom-strategy]]
409409

0 commit comments

Comments
 (0)