How to manually upload images into in-cluster registry for AS 24.10?
Issue description:
Node turn "not Ready"(OOM) when uploading big DU offline bundles or optional bundles, now we are seeding images serially. This still uses high memory. But in internal testing, we noticed that the process does not take down the node.
Affected versions: 24.10.0 - 24.10.3
Fixed version: 24.10.4
Workaround for affected versions:
Execute the below script by replacing tar_file_path (after unzipping the bundle. Eg. /uipath/tmp/offline-bundle.ByVzAUNbUk/sf-images/images.tar), docker_registry_password and docker_registry_username (from cluster_config - infra.docker_registry OR via secret uipath/docker-registry-credentials ).
Ensure that the uipathctl executable path is correct.
function get_registry_addresses() {
local namespace="docker-registry"
local lh_registry=1
local server_node_count
lh_registry=$(kubectl get deployment -n "${namespace}" docker-registry --ignore-not-found --no-headers | wc -l)
server_node_count=$(kubectl get nodes -l "node-role.kubernetes.io/master=true" --no-headers | wc -l)
IFS=" " read -r -a registry_addresses <<<"$(kubectl get pods -n ${namespace} -o jsonpath="{.items[*].status.podIP}" -l app=docker-registry)"
if [[ "${lh_registry}" -eq 1 ]]; then
[[ "${#registry_addresses[@]}" -eq 1 ]] || error "Failed to get address of registry pod."
else
[[ "${#registry_addresses[@]}" -eq "${server_node_count}" ]] || error "Failed to get address of all registry pods."
fi
echo "${registry_addresses[@]}"
}
registry_addresses=($(get_registry_addresses))
for ip in "${registry_addresses[@]}"; do
./bin/uipathctl registry seed \
--tar-file "<tar_file_path>" \
--dest-registry "${ip}:5000" \
--dest-password "<docker_registry_password>" \
--dest-username "<docker_registry_username>" \
--log-level debug \
--num-worker 1
done
You can use this script to upload images directly to in-cluster registry .