1OC SET(1)                          June 2016                         OC SET(1)
2
3
4

NAME

6       oc set triggers - Update the triggers on one or more objects
7
8
9

SYNOPSIS

11       oc set triggers [OPTIONS]
12
13
14

DESCRIPTION

16       Set or remove triggers
17
18
19       Build configs, deployment configs, and most Kubernetes workload objects
20       may have a set of triggers that result in a new deployment or build be‐
21       ing  created  when  an image changes. This command enables you to alter
22       those triggers - making them automatic or manual, adding  new  entries,
23       or changing existing entries.
24
25
26       Deployments  support  triggering  off  of  image  changes and on config
27       changes. Config changes are any alterations to the pod template,  while
28       image  changes  will  result in the container image value being updated
29       whenever an image stream tag is updated. You may  also  trigger  Kuber‐
30       netes  stateful  sets, daemon sets, deployments, and cron jobs from im‐
31       ages. Disabling the config change trigger is equivalent to pausing most
32       objects. Deployment configs will not perform their first deployment un‐
33       til all image change triggers have been submitted.
34
35
36       Build configs support triggering off of image changes, config  changes,
37       and  webhooks.  The  config change trigger for a build config will only
38       trigger the first build.
39
40
41

OPTIONS

43       --all=false
44           If true, select all resources in the namespace of the specified re‐
45       source types
46
47
48       --allow-missing-template-keys=true
49           If  true, ignore any errors in templates when a field or map key is
50       missing in the template. Only applies to  golang  and  jsonpath  output
51       formats.
52
53
54       --auto=false
55           If true, enable all triggers, or just the specified trigger
56
57
58       -c, --containers=""
59           Comma  delimited list of container names this trigger applies to on
60       deployments; defaults to the name of the only container
61
62
63       --dry-run=false
64           If true, only print the object that would be sent, without  sending
65       it.
66
67
68       -f, --filename=[]
69           Filename, directory, or URL to files to use to edit the resource
70
71
72       --from-bitbucket=false
73           If true, a Bitbucket webhook - a secret value will be generated au‐
74       tomatically
75
76
77       --from-config=false
78           If set, configuration changes will result in a change
79
80
81       --from-github=false
82           If true, a GitHub webhook - a secret value will be generated  auto‐
83       matically
84
85
86       --from-gitlab=false
87           If  true, a GitLab webhook - a secret value will be generated auto‐
88       matically
89
90
91       --from-image=""
92           An image stream tag to trigger off of
93
94
95       --from-webhook=false
96           If true, a generic webhook - a secret value will be generated auto‐
97       matically
98
99
100       --from-webhook-allow-env=false
101           If  true, a generic webhook which can provide environment variables
102       - a secret value will be generated automatically
103
104
105       --local=false
106           If true, set image will NOT contact api-server but run locally.
107
108
109       --manual=false
110           If true, set all triggers to manual, or just the specified trigger
111
112
113       -o, --output=""
114           Output format. One of:  json|yaml|name|template|go-template|go-tem‐
115       plate-file|templatefile|jsonpath|jsonpath-file.
116
117
118       -R, --recursive=false
119           Process  the  directory  used in -f, --filename recursively. Useful
120       when you want to manage related manifests organized within the same di‐
121       rectory.
122
123
124       --remove=false
125           If true, remove the specified trigger(s).
126
127
128       --remove-all=false
129           If true, remove all triggers.
130
131
132       -l, --selector=""
133           Selector (label query) to filter on
134
135
136       --template=""
137           Template  string  or  path  to template file to use when -o=go-tem‐
138       plate, -o=go-template-file. The template format is golang  templates  [
139http://golang.org/pkg/text/template/#pkg-overview⟩].
140
141
142

OPTIONS INHERITED FROM PARENT COMMANDS

144       --allow_verification_with_non_compliant_keys=false
145           Allow  a  SignatureVerifier  to  use  keys  which  are  technically
146       non-compliant with RFC6962.
147
148
149       --alsologtostderr=false
150           log to standard error as well as files
151
152
153       --application_metrics_count_limit=100
154           Max number of application metrics to store (per container)
155
156
157       --as=""
158           Username to impersonate for the operation
159
160
161       --as-group=[]
162           Group to impersonate for the operation, this flag can  be  repeated
163       to specify multiple groups.
164
165
166       --azure-container-registry-config=""
167           Path  to the file containing Azure container registry configuration
168       information.
169
170
171       --boot_id_file="/proc/sys/kernel/random/boot_id"
172           Comma-separated list of files to check for boot-id. Use  the  first
173       one that exists.
174
175
176       --cache-dir="/builddir/.kube/http-cache"
177           Default HTTP cache directory
178
179
180       --certificate-authority=""
181           Path to a cert file for the certificate authority
182
183
184       --client-certificate=""
185           Path to a client certificate file for TLS
186
187
188       --client-key=""
189           Path to a client key file for TLS
190
191
192       --cloud-provider-gce-lb-src-cidrs=130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
193           CIDRs opened in GCE firewall for LB traffic proxy  health checks
194
195
196       --cluster=""
197           The name of the kubeconfig cluster to use
198
199
200       --container_hints="/etc/cadvisor/container_hints.json"
201           location of the container hints file
202
203
204       --containerd="unix:///var/run/containerd.sock"
205           containerd endpoint
206
207
208       --context=""
209           The name of the kubeconfig context to use
210
211
212       --default-not-ready-toleration-seconds=300
213           Indicates   the   tolerationSeconds   of   the    toleration    for
214       notReady:NoExecute  that is added by default to every pod that does not
215       already have such a toleration.
216
217
218       --default-unreachable-toleration-seconds=300
219           Indicates the tolerationSeconds  of  the  toleration  for  unreach‐
220       able:NoExecute  that is added by default to every pod that does not al‐
221       ready have such a toleration.
222
223
224       --docker="unix:///var/run/docker.sock"
225           docker endpoint
226
227
228       --docker-tls=false
229           use TLS to connect to docker
230
231
232       --docker-tls-ca="ca.pem"
233           path to trusted CA
234
235
236       --docker-tls-cert="cert.pem"
237           path to client certificate
238
239
240       --docker-tls-key="key.pem"
241           path to private key
242
243
244       --docker_env_metadata_whitelist=""
245           a comma-separated list of environment variable keys that  needs  to
246       be collected for docker containers
247
248
249       --docker_only=false
250           Only report docker containers in addition to root stats
251
252
253       --docker_root="/var/lib/docker"
254           DEPRECATED:  docker  root is read from docker info (this is a fall‐
255       back, default: /var/lib/docker)
256
257
258       --enable_load_reader=false
259           Whether to enable cpu load reader
260
261
262       --event_storage_age_limit="default=24h"
263           Max length of time for which to store events (per type). Value is a
264       comma  separated  list  of  key  values, where the keys are event types
265       (e.g.: creation, oom) or "default" and the value is a duration. Default
266       is applied to all non-specified event types
267
268
269       --event_storage_event_limit="default=100000"
270           Max  number  of  events to store (per type). Value is a comma sepa‐
271       rated list of key values, where the keys are event  types  (e.g.:  cre‐
272       ation,  oom)  or  "default" and the value is an integer. Default is ap‐
273       plied to all non-specified event types
274
275
276       --global_housekeeping_interval=0
277           Interval between global housekeepings
278
279
280       --housekeeping_interval=0
281           Interval between container housekeepings
282
283
284       --insecure-skip-tls-verify=false
285           If true, the server's certificate will not be checked for validity.
286       This will make your HTTPS connections insecure
287
288
289       --kubeconfig=""
290           Path to the kubeconfig file to use for CLI requests.
291
292
293       --log-flush-frequency=0
294           Maximum number of seconds between log flushes
295
296
297       --log_backtrace_at=:0
298           when logging hits line file:N, emit a stack trace
299
300
301       --log_cadvisor_usage=false
302           Whether to log the usage of the cAdvisor container
303
304
305       --log_dir=""
306           If non-empty, write log files in this directory
307
308
309       --logtostderr=true
310           log to standard error instead of files
311
312
313       --machine_id_file="/etc/machine-id,/var/lib/dbus/machine-id"
314           Comma-separated  list  of  files  to  check for machine-id. Use the
315       first one that exists.
316
317
318       --match-server-version=false
319           Require server version to match client version
320
321
322       -n, --namespace=""
323           If present, the namespace scope for this CLI request
324
325
326       --request-timeout="0"
327           The length of time to wait before giving up on a single server  re‐
328       quest.  Non-zero  values should contain a corresponding time unit (e.g.
329       1s, 2m, 3h). A value of zero means don't timeout requests.
330
331
332       -s, --server=""
333           The address and port of the Kubernetes API server
334
335
336       --stderrthreshold=2
337           logs at or above this threshold go to stderr
338
339
340       --storage_driver_buffer_duration=0
341           Writes in the storage driver will be buffered  for  this  duration,
342       and committed to the non memory backends as a single transaction
343
344
345       --storage_driver_db="cadvisor"
346           database name
347
348
349       --storage_driver_host="localhost:8086"
350           database host:port
351
352
353       --storage_driver_password="root"
354           database password
355
356
357       --storage_driver_secure=false
358           use secure connection with database
359
360
361       --storage_driver_table="stats"
362           table name
363
364
365       --storage_driver_user="root"
366           database username
367
368
369       --token=""
370           Bearer token for authentication to the API server
371
372
373       --user=""
374           The name of the kubeconfig user to use
375
376
377       -v, --v=0
378           log level for V logs
379
380
381       --version=false
382           Print version information and quit
383
384
385       --vmodule=
386           comma-separated  list  of pattern=N settings for file-filtered log‐
387       ging
388
389
390

EXAMPLE

392                # Print the triggers on the registry
393                oc set triggers dc/registry
394
395                # Set all triggers to manual
396                oc set triggers dc/registry --manual
397
398                # Enable all automatic triggers
399                oc set triggers dc/registry --auto
400
401                # Reset the GitHub webhook on a build to a new, generated secret
402                oc set triggers bc/webapp --from-github
403                oc set triggers bc/webapp --from-webhook
404
405                # Remove all triggers
406                oc set triggers bc/webapp --remove-all
407
408                # Stop triggering on config change
409                oc set triggers dc/registry --from-config --remove
410
411                # Add an image trigger to a build config
412                oc set triggers bc/webapp --from-image=namespace1/image:latest
413
414                # Add an image trigger to a stateful set on the main container
415                oc set triggers statefulset/db --from-image=namespace1/image:latest -c main
416
417
418
419

SEE ALSO

421       oc-set(1),
422
423
424

HISTORY

426       June 2016, Ported from the Kubernetes man-doc generator
427
428
429
430Openshift                  Openshift CLI User Manuals                OC SET(1)
Impressum