@@ -48,31 +48,31 @@ following is an example of a `*deploymentConfig*` resource:
48
48
----
49
49
kind: "DeploymentConfig"
50
50
apiVersion: "v1"
51
- metadata:
51
+ metadata:
52
52
name: "frontend"
53
- spec:
53
+ spec:
54
54
template: <1>
55
- metadata:
56
- labels:
55
+ metadata:
56
+ labels:
57
57
name: "frontend"
58
- spec:
59
- containers:
58
+ spec:
59
+ containers:
60
60
- name: "helloworld"
61
61
image: "openshift/origin-ruby-sample"
62
- ports:
62
+ ports:
63
63
- containerPort: 8080
64
64
protocol: "TCP"
65
65
replicas: 5 <2>
66
- selector:
66
+ selector:
67
67
name: "frontend"
68
- triggers:
68
+ triggers:
69
69
- type: "ConfigChange" <3>
70
70
- type: "ImageChange" <4>
71
- imageChangeParams:
71
+ imageChangeParams:
72
72
automatic: true
73
- containerNames:
73
+ containerNames:
74
74
- "helloworld"
75
- from:
75
+ from:
76
76
kind: "ImageStreamTag"
77
77
name: "origin-ruby-sample:latest"
78
78
strategy: <5>
@@ -239,7 +239,7 @@ The following is an example of a ConfigChange trigger:
239
239
240
240
[source,yaml]
241
241
----
242
- triggers:
242
+ triggers:
243
243
- type: "ConfigChange"
244
244
----
245
245
====
@@ -256,14 +256,14 @@ The following is an example of an ImageChange trigger:
256
256
257
257
[source,json]
258
258
----
259
- triggers:
259
+ triggers:
260
260
- type: "ImageChange"
261
- imageChangeParams:
261
+ imageChangeParams:
262
262
automatic: true <1>
263
- from:
263
+ from:
264
264
kind: "ImageStreamTag"
265
265
name: "origin-ruby-sample:latest"
266
- containerNames:
266
+ containerNames:
267
267
- "helloworld"
268
268
----
269
269
<1> If the `*automatic*` option is set to `false`, the trigger is disabled.
@@ -383,17 +383,19 @@ strategy:
383
383
type: Recreate
384
384
recreateParams: <1>
385
385
pre: {} <2>
386
+ mid: {}
386
387
post: {}
387
388
----
388
389
389
390
<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].
391
392
====
392
393
393
394
The Recreate strategy will:
394
395
395
396
. Execute any "pre" lifecycle hook.
396
397
. Scale down the previous deployment to zero.
398
+ . Execute any "mid" lifecycle hook.
397
399
. Scale up the new deployment.
398
400
. Execute any "post" lifecycle hook.
399
401
@@ -402,8 +404,6 @@ than one, the first replica of the deployment will be validated for readiness
402
404
before fully scaling up the deployment. If the validation of the first replica
403
405
fails, the deployment will be considered a failure.
404
406
405
- IMPORTANT: When executing the "post" lifecycle hook, all failures will be
406
- ignored regardless of the failure policy specified on the hook.
407
407
408
408
[[custom-strategy]]
409
409
0 commit comments