You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This section of agent-uninstall.sh filters on the label to get the pod
if [[ $($KUBECTL get pods -n ${AGENT_NAMESPACE} -l app=agent,type!=auto-upgrade-cronjob -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; then
AGENT_POD_READY="false"
else
AGENT_POD_READY="true"
fi
But this next section does not
if [ "$AGENT_POD_READY" == "true" ]; then
POD_ID=$($KUBECTL get pod -n ${AGENT_NAMESPACE} 2> /dev/null | grep "agent-" | cut -d " " -f1 2> /dev/null)
if [ -n "${POD_ID}" ]; then
log_info "get pod: ${POD_ID}"
else
log_info "Failed to get pod id, exiting..."
exit 1
fi
fi
So if you have another pod running that has agent- in its name the script will get both of them
This is what the log looks like in that situation...
We should only get the PODID that has the label of "app=agent"
Describe the bug.
This section of agent-uninstall.sh filters on the label to get the pod
But this next section does not
So if you have another pod running that has
agent-
in its name the script will get both of themThis is what the log looks like in that situation...
We should only get the PODID that has the label of "app=agent"
Describe the steps to reproduce the behavior.
No response
Expected behavior.
No response
Screenshots.
No response
Operating Environment
Linux
Additional Information
No response
The text was updated successfully, but these errors were encountered: