@@ -319,6 +319,48 @@ get_rollout_configMap(){
319
319
run_and_log " oc -n $1 get configmap/${rolloutConfigMap} -o json" " $2 /rollout-configMap.json"
320
320
}
321
321
322
+ # get_rollout_events; takes namespace and directory as parameter
323
+ get_rollout_events (){
324
+ echo " * Getting warning events in $1 ..."
325
+ run_and_log " oc get events -n $1 --field-selector type=Warning" " $2 /warning-events.txt"
326
+ echo " * Getting error events in $1 ..."
327
+ run_and_log " oc get events -n $1 --field-selector type=Error" " $2 /error-events.txt"
328
+ echo " * Getting all events in $1 ..."
329
+ run_and_log " oc get events -n $1 " " $2 /all-events.txt"
330
+ }
331
+
332
+ # get_rollout_analysisruns; takes namespace and directory as argument
333
+ get_rollout_analysisruns (){
334
+ echo " * Getting rollout analysisrun in $1 ..."
335
+ run_and_log " oc -n $1 get analysisruns" " $2 /rollout-analysisrun.txt"
336
+ run_and_log " oc -n $1 get analysisruns -o yaml" " $2 /rollout-analysisrun.yaml"
337
+ run_and_log " oc -n $1 get analysisruns -o json" " $2 /rollout-analysisrun.json"
338
+ }
339
+
340
+ # get_rollout_analysistemplates; takes namespace and directory as argument
341
+ get_rollout_analysistemplates (){
342
+ echo " * Getting rollout analysisrun in $1 ..."
343
+ run_and_log " oc -n $1 get analysistemplates" " $2 /rollout-analysistemplate.txt"
344
+ run_and_log " oc -n $1 get analysistemplates -o yaml" " $2 /rollout-analysistemplate.yaml"
345
+ run_and_log " oc -n $1 get analysistemplates -o json" " $2 /rollout-analysistemplate.json"
346
+ }
347
+
348
+ # get_rollout_clusteranalysistemplates; takes namespace and directory as argument
349
+ get_rollout_clusteranalysistemplates (){
350
+ echo " * Getting rollout analysisrun in $1 ..."
351
+ run_and_log " oc -n $1 get clusteranalysistemplates" " $2 /rollout-clusteranalysistemplate.txt"
352
+ run_and_log " oc -n $1 get clusteranalysistemplates -o yaml" " $2 /rollout-clusteranalysistemplate.yaml"
353
+ run_and_log " oc -n $1 get clusteranalysistemplates -o json" " $2 /rollout-clusteranalysistemplate.json"
354
+ }
355
+
356
+ # get_rollout_experiments; takes namespace and directory as argument
357
+ get_rollout_experiments (){
358
+ echo " * Getting rollout analysisrun in $1 ..."
359
+ run_and_log " oc -n $1 get experiments" " $2 /rollout-experiment.txt"
360
+ run_and_log " oc -n $1 get experiments -o yaml" " $2 /rollout-experiment.yaml"
361
+ run_and_log " oc -n $1 get experiments -o json" " $2 /rollout-experiment.json"
362
+ }
363
+
322
364
function main() {
323
365
324
366
# Initialize the directory where the must-gather data will be stored and the error log file
@@ -486,6 +528,26 @@ function main() {
486
528
create_directory " ${ROLLOUTS_CONFIGMAP_DIR} "
487
529
get_rollout_configMap " ${rolloutNamespace} " " ${ROLLOUTS_CONFIGMAP_DIR} "
488
530
531
+ ROLLOUTS_EVENTS_DIR=" ${ROLLOUTS_RESOURCES_DIR} /rollout_events"
532
+ create_directory " ${ROLLOUTS_EVENTS_DIR} "
533
+ get_rollout_events " ${rolloutNamespace} " " ${ROLLOUTS_EVENTS_DIR} "
534
+
535
+ ROLLOUTS_ANALYSISRUN_DIR=" ${ROLLOUTS_RESOURCES_DIR} /rollout_analysisruns"
536
+ create_directory " ${ROLLOUTS_ANALYSISRUN_DIR} "
537
+ get_rollout_analysisruns " ${rolloutNamespace} " " ${ROLLOUTS_ANALYSISRUN_DIR} "
538
+
539
+ ROLLOUTS_ANALYSISTEMPLATES_DIR=" ${ROLLOUTS_RESOURCES_DIR} /rollout_analysistemplates"
540
+ create_directory " ${ROLLOUTS_ANALYSISTEMPLATES_DIR} "
541
+ get_rollout_analysistemplates " ${rolloutNamespace} " " ${ROLLOUTS_ANALYSISTEMPLATES_DIR} "
542
+
543
+ ROLLOUTS_CLUSTERANALYSISTEMPLATES_DIR=" ${ROLLOUTS_RESOURCES_DIR} /rollout_clusteranalysistemplates"
544
+ create_directory " ${ROLLOUTS_CLUSTERANALYSISTEMPLATES_DIR} "
545
+ get_rollout_analysistemplates " ${rolloutNamespace} " " ${ROLLOUTS_CLUSTERANALYSISTEMPLATES_DIR} "
546
+
547
+ ROLLOUTS_EXPERIMENTS_DIR=" ${ROLLOUTS_RESOURCES_DIR} /rollout_experiments"
548
+ create_directory " ${ROLLOUTS_EXPERIMENTS_DIR} "
549
+ get_rollout_experiments " ${rolloutNamespace} " " ${ROLLOUTS_EXPERIMENTS_DIR} "
550
+
489
551
echo " * Getting Rollout logs in ${rolloutNamespace} ..."
490
552
ROLLOUTS_LOG_DIR=" ${ROLLOUTS_RESOURCES_DIR} /logs"
491
553
create_directory " ${ROLLOUTS_LOG_DIR} "
0 commit comments