Skip to content

Commit 6e32b82

Browse files
authored
Add the ConfigMap for rollouts (#19)
Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com>
1 parent bf6d388 commit 6e32b82

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

gather_gitops.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ get_rollout_replicaSet(){
299299
run_and_log "oc -n $1 get replicaset/argo-rollouts -o json" "$2/rollout-replicaSet.json"
300300
}
301301

302-
# gets services; takes namespace and directory as argument
302+
# gets rollout services; takes namespace and directory as argument
303303
get_rollout_services(){
304304
echo " * Getting rollout services in $1..."
305305
local rolloutName
@@ -309,6 +309,16 @@ get_rollout_services(){
309309
run_and_log "oc -n $1 get service/${rolloutName} -o json" "$2/rollout-service.json"
310310
}
311311

312+
# gets rollout configMap; takes namespace and directory as argument
313+
get_rollout_configMap(){
314+
echo " * Getting rollout configMap in $1..."
315+
local rolloutConfigMap
316+
rolloutConfigMap="argo-rollouts-config"
317+
run_and_log "oc -n $1 get configmap/${rolloutConfigMap}" "$2/rollout-configMap.txt"
318+
run_and_log "oc -n $1 get configmap/${rolloutConfigMap} -o yaml" "$2/rollout-configMap.yaml"
319+
run_and_log "oc -n $1 get configmap/${rolloutConfigMap} -o json" "$2/rollout-configMap.json"
320+
}
321+
312322
function main() {
313323

314324
# Initialize the directory where the must-gather data will be stored and the error log file
@@ -472,6 +482,10 @@ function main() {
472482
create_directory "${ROLLOUTS_SERVICES_DIR}"
473483
get_rollout_services "${rolloutNamespace}" "${ROLLOUTS_SERVICES_DIR}"
474484

485+
ROLLOUTS_CONFIGMAP_DIR="${ROLLOUTS_RESOURCES_DIR}/rollout_configMap"
486+
create_directory "${ROLLOUTS_CONFIGMAP_DIR}"
487+
get_rollout_configMap "${rolloutNamespace}" "${ROLLOUTS_CONFIGMAP_DIR}"
488+
475489
echo " * Getting Rollout logs in ${rolloutNamespace}..."
476490
ROLLOUTS_LOG_DIR="${ROLLOUTS_RESOURCES_DIR}/logs"
477491
create_directory "${ROLLOUTS_LOG_DIR}"

0 commit comments

Comments
 (0)