This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.8.2. Triggering Kubernetes resources
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 OpenShift Container Platform to request triggering.
The annotation is defined as follows:
- 1
- Required:
kindis the resource to trigger from must beImageStreamTag. - 2
- Required:
namemust be the name of an image stream tag. - 3
- Optional:
namespacedefaults to the namespace of the object. - 4
- Required:
fieldPathis 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". - 5
- Optional:
pausedis whether or not the trigger is paused, and the default value isfalse. Setpausedtotrueto temporarily disable this trigger.
When one of the core Kubernetes resources contains both a pod template and this annotation, OpenShift Container Platform 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.
Examples of core Kubernetes resources that can contain both a pod template and annotation include:
-
CronJobs -
Deployments -
StatefulSets -
DaemonSets -
Jobs -
ReplicationControllers -
Pods