Skip to content

fix: update ConfigMap name in Argo CD root path retrieval script #514

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

Merged
merged 1 commit into from
May 27, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ spec:
get_argocd_root_path() {
local root_path

echo "Fetching Argo CD root path from ConfigMap '$ARGOCD_CM_PARAMS_NAME' in namespace '$NAMESPACE'..."
root_path=$(kubectl get configmap "$ARGOCD_CM_PARAMS_NAME" -n "$NAMESPACE" -o jsonpath='{.data.server\.rootpath}' 2>/dev/null || echo "")
echo "Fetching Argo CD root path from ConfigMap 'argocd-cmd-params-cm' in namespace '$NAMESPACE'..."
root_path=$(kubectl get configmap "argocd-cmd-params-cm" -n "$NAMESPACE" -o jsonpath='{.data.server\.rootpath}' 2>/dev/null || echo "")

if [ -n "$root_path" ] && [ "$root_path" != "/" ]; then
root_path=$(echo "$root_path" | sed 's:/*$::') # Remove trailing slash
[ "${root_path#\/}" = "$root_path" ] && root_path="/$root_path" # Add leading slash if missing
elif [ "$root_path" = "/" ]; then
root_path="" # Treat as empty for URL construction
else
echo "Warning: 'server.rootpath' not found in ConfigMap '$ARGOCD_CM_PARAMS_NAME' or ConfigMap not found. Assuming default root path '/'. "
echo "Warning: 'server.rootpath' not found in ConfigMap 'argocd-cmd-params-cm' or ConfigMap not found. Assuming default root path '/'. "
root_path="" # Default to empty string
fi

Expand Down