Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

9.3.5.2. 使用命令行

oc set deployment-hook 命令可用于为部署配置设置部署 hook。在上例中,您可以使用以下命令设置部署前 hook:

$ oc set deployment-hook dc/frontend --pre -c helloworld -e CUSTOM_VAR1=custom_value1 \
  -v data --failure-policy=abort -- /usr/bin/command arg1 arg2