1OC SET(1) June 2016 OC SET(1)
2
3
4
6 oc set triggers - Update the triggers on one or more objects
7
8
9
11 oc set triggers [OPTIONS]
12
13
14
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
21 being 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
31 images. Disabling the config change trigger is equivalent to pausing
32 most objects. Deployment configs will not perform their first deploy‐
33 ment until 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
43 --all=false
44 If true, select all resources in the namespace of the specified
45 resource 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
74 automatically
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
121 directory.
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 [
139 ⟨http://golang.org/pkg/text/template/#pkg-overview⟩].
140
141
142
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
221 already 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
273 applied 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 --httptest.serve=""
285 if non-empty, httptest.NewServer serves on this address and blocks
286
287
288 --insecure-skip-tls-verify=false
289 If true, the server's certificate will not be checked for validity.
290 This will make your HTTPS connections insecure
291
292
293 --kubeconfig=""
294 Path to the kubeconfig file to use for CLI requests.
295
296
297 --log-flush-frequency=0
298 Maximum number of seconds between log flushes
299
300
301 --log_backtrace_at=:0
302 when logging hits line file:N, emit a stack trace
303
304
305 --log_cadvisor_usage=false
306 Whether to log the usage of the cAdvisor container
307
308
309 --log_dir=""
310 If non-empty, write log files in this directory
311
312
313 --logtostderr=true
314 log to standard error instead of files
315
316
317 --machine_id_file="/etc/machine-id,/var/lib/dbus/machine-id"
318 Comma-separated list of files to check for machine-id. Use the
319 first one that exists.
320
321
322 --match-server-version=false
323 Require server version to match client version
324
325
326 -n, --namespace=""
327 If present, the namespace scope for this CLI request
328
329
330 --request-timeout="0"
331 The length of time to wait before giving up on a single server
332 request. Non-zero values should contain a corresponding time unit (e.g.
333 1s, 2m, 3h). A value of zero means don't timeout requests.
334
335
336 -s, --server=""
337 The address and port of the Kubernetes API server
338
339
340 --stderrthreshold=2
341 logs at or above this threshold go to stderr
342
343
344 --storage_driver_buffer_duration=0
345 Writes in the storage driver will be buffered for this duration,
346 and committed to the non memory backends as a single transaction
347
348
349 --storage_driver_db="cadvisor"
350 database name
351
352
353 --storage_driver_host="localhost:8086"
354 database host:port
355
356
357 --storage_driver_password="root"
358 database password
359
360
361 --storage_driver_secure=false
362 use secure connection with database
363
364
365 --storage_driver_table="stats"
366 table name
367
368
369 --storage_driver_user="root"
370 database username
371
372
373 --token=""
374 Bearer token for authentication to the API server
375
376
377 --user=""
378 The name of the kubeconfig user to use
379
380
381 -v, --v=0
382 log level for V logs
383
384
385 --version=false
386 Print version information and quit
387
388
389 --vmodule=
390 comma-separated list of pattern=N settings for file-filtered log‐
391 ging
392
393
394
396 # Print the triggers on the registry
397 oc set triggers dc/registry
398
399 # Set all triggers to manual
400 oc set triggers dc/registry --manual
401
402 # Enable all automatic triggers
403 oc set triggers dc/registry --auto
404
405 # Reset the GitHub webhook on a build to a new, generated secret
406 oc set triggers bc/webapp --from-github
407 oc set triggers bc/webapp --from-webhook
408
409 # Remove all triggers
410 oc set triggers bc/webapp --remove-all
411
412 # Stop triggering on config change
413 oc set triggers dc/registry --from-config --remove
414
415 # Add an image trigger to a build config
416 oc set triggers bc/webapp --from-image=namespace1/image:latest
417
418 # Add an image trigger to a stateful set on the main container
419 oc set triggers statefulset/db --from-image=namespace1/image:latest -c main
420
421
422
423
425 oc-set(1),
426
427
428
430 June 2016, Ported from the Kubernetes man-doc generator
431
432
433
434Openshift Openshift CLI User Manuals OC SET(1)