## NOTE 

If an image change trigger is defined on a DeploymentConfig  object (with a config change trigger and automatic=false , or with automatic=true ) and the image stream tag pointed by the image change trigger does not exist yet, the initial deployment process will automatically start as soon as an image is imported or pushed by a build to the image stream tag. 

## 3.2.1.7.1. Setting deployment triggers 

## Procedure 

1. You can set deployment triggers for a DeploymentConfig  object using the oc set triggers command. For example, to set a image change trigger, use the following command: 

## 3.2.1.8. Setting deployment resources 

$ oc set triggers dc/<dc_name> \ --from-image=<project>/<image>:<tag> -c <container_name> 

A deployment is completed by a pod that consumes resources (memory, CPU, and ephemeral storage) on a node. By default, pods consume unbounded node resources. However, if a project specifies default container limits, then pods consume resources up to those limits. 

## NOTE 

The minimum memory limit for a deployment is 12 MB. If a container fails to start due to a Cannot allocate memory  pod event, the memory limit is too low. Either increase or remove the memory limit. Removing the limit allows pods to consume unbounded node resources. 

You can also limit resource use by specifying resource limits as part of the deployment strategy. Deployment resources can be used with the recreate, rolling, or custom deployment strategies. 

## Procedure 

1. In the following example, each of resources , cpu , memory , and ephemeral-storage  is optional: 

type: "Recreate" resources: limits: cpu: "100m" 1 memory: "256Mi" 2 ephemeral-storage: "1Gi" 3 

1 cpu  is in CPU units: 100m  represents 0.1 CPU units (100 * 1e-3). 

2 memory  is in bytes: 256Mi  represents 268435456 bytes (256 * 2 ^ 20). 

3 ephemeral-storage  is in bytes: 1Gi  represents 1073741824 bytes (2 ^ 30). 

However, if a quota has been defined for your project, one of the following two items is required: 

