Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ConfigMap for rollouts #19

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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