Skip to content

Commit 9a673ae

Browse files
jldohmannopenshift-cherrypick-robot
authored andcommitted
update with CQA DITA compliance
1 parent 49474cc commit 9a673ae

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

modules/images-triggering-updates-imagestream-changes-kubernetes-about.adoc

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
[id="images-triggering-updates-imagestream-changes-kubernetes-about_{context}"]
77
= Triggering Kubernetes resources
88

9+
[role="_abstract"]
10+
To enable Kubernetes resources, such as `Deployments` and `StatefulSets`, to seamlessly consume new image versions, configure image stream change triggers in {product-title}. This ensures your application deployments are automatically updated when the associated image stream detects a change.
11+
912
Kubernetes resources do not have fields for triggering, unlike deployment and build configurations, which include as part of their API definition a set of fields for controlling triggers. Instead, you can use annotations in {product-title} to request triggering.
1013

1114
The annotation is defined as follows:
@@ -20,22 +23,24 @@ metadata:
2023
[
2124
{
2225
"from": {
23-
"kind": "ImageStreamTag", <1>
24-
"name": "example:latest", <2>
25-
"namespace": "myapp" <3>
26+
"kind": "ImageStreamTag",
27+
"name": "example:latest",
28+
"namespace": "myapp"
2629
},
27-
"fieldPath": "spec.template.spec.containers[?(@.name==\"web\")].image", <4>
28-
"paused": false <5>
30+
"fieldPath": "spec.template.spec.containers[?(@.name==\"web\")].image",
31+
"paused": false
2932
},
3033
# ...
3134
]
3235
# ...
3336
----
34-
<1> Required: `kind` is the resource to trigger from must be `ImageStreamTag`.
35-
<2> Required: `name` must be the name of an image stream tag.
36-
<3> Optional: `namespace` defaults to the namespace of the object.
37-
<4> Required: `fieldPath` is the JSON path to change. This field is limited and accepts only a JSON path expression that precisely matches a container by ID or index. For pods, the JSON path is `spec.containers[?(@.name='web')].image`.
38-
<5> Optional: `paused` is whether or not the trigger is paused, and the default value is `false`. Set `paused` to `true` to temporarily disable this trigger.
37+
where:
38+
39+
`kind`:: Specifies the resource to trigger from, and must have the value `ImageStreamTag`.
40+
`name`:: Specifies the name of an image stream tag.
41+
`namespace`:: Specifies the namespace of the object. This field is optional.
42+
`fieldPath`:: Specifies the JSON path to change. This field is limited and accepts only a JSON path expression that precisely matches a container by ID or index. For pods, the JSON path is `spec.containers[?(@.name='web')].image`.
43+
`paused`:: Specifies whether or not the trigger is paused. This field is optional, and defaults to the value `false`. Set the value to `true` to temporarily disable this trigger.
3944

4045
When one of the core Kubernetes resources contains both a pod template and this annotation, {product-title} attempts to update the object by using the image currently associated with the image stream tag that is referenced by trigger. The update is performed against the `fieldPath` specified.
4146

modules/images-triggering-updates-imagestream-changes-kubernetes-cli.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
[id="images-triggering-updates-imagestream-changes-kubernetes-cli_{context}"]
88
= Setting the image trigger on Kubernetes resources
99

10+
[role="_abstract"]
11+
To enable automatic updates for your deployed applications managed by Kubernetes, use the command-line interface (CLI) to set an image stream change trigger on Kubernetes resources. This ensures that resources, like `Deployments` and `StatefulSets`, are automatically invoked when a new version of an upstream image is available.
12+
1013
When adding an image trigger to deployments, you can use the `oc set triggers` command. For example, the sample command in this procedure adds an image change trigger to the deployment named `example` so that when the `example:latest` image stream tag is updated, the `web` container inside the deployment updates with the new image value. This command sets the correct `image.openshift.io/triggers` annotation on the deployment resource.
1114

1215
.Procedure

0 commit comments

Comments
 (0)