Skip to content

Commit

Permalink
Add the ConfigMap for rollouts (#19)
Browse files Browse the repository at this point in the history
Signed-off-by: Rizwana777 <[email protected]>
  • Loading branch information
Rizwana777 authored Apr 15, 2024
1 parent bf6d388 commit 6e32b82
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion gather_gitops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ get_rollout_replicaSet(){
run_and_log "oc -n $1 get replicaset/argo-rollouts -o json" "$2/rollout-replicaSet.json"
}

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

# gets rollout configMap; takes namespace and directory as argument
get_rollout_configMap(){
echo " * Getting rollout configMap in $1..."
local rolloutConfigMap
rolloutConfigMap="argo-rollouts-config"
run_and_log "oc -n $1 get configmap/${rolloutConfigMap}" "$2/rollout-configMap.txt"
run_and_log "oc -n $1 get configmap/${rolloutConfigMap} -o yaml" "$2/rollout-configMap.yaml"
run_and_log "oc -n $1 get configmap/${rolloutConfigMap} -o json" "$2/rollout-configMap.json"
}

function main() {

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

ROLLOUTS_CONFIGMAP_DIR="${ROLLOUTS_RESOURCES_DIR}/rollout_configMap"
create_directory "${ROLLOUTS_CONFIGMAP_DIR}"
get_rollout_configMap "${rolloutNamespace}" "${ROLLOUTS_CONFIGMAP_DIR}"

echo " * Getting Rollout logs in ${rolloutNamespace}..."
ROLLOUTS_LOG_DIR="${ROLLOUTS_RESOURCES_DIR}/logs"
create_directory "${ROLLOUTS_LOG_DIR}"
Expand Down

0 comments on commit 6e32b82

Please sign in to comment.