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

Fix deploy-on-kind with docker hub as registry #2709

Merged
merged 1 commit into from
Jul 19, 2023
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
13 changes: 9 additions & 4 deletions scripts/deploy-on-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ function ensure_local_registry() {
function install_dependencies() {
pushd "${ROOT_DIR}" >/dev/null
{
export INSECURE_TLS_METRICS_SERVER=true

"${SCRIPT_DIR}/install-dependencies.sh"
"${SCRIPT_DIR}/install-dependencies.sh" -i
}
popd >/dev/null
}
Expand Down Expand Up @@ -192,9 +190,16 @@ EOF
}

function create_registry_secret() {
local docker_server="$DOCKER_SERVER"

# docker hub is very picky about its server name
if [ "$docker_server" == "" ] || [ "$docker_server" == "index.docker.io" ]; then
docker_server="https://index.docker.io/v1/"
fi

kubectl delete -n cf secret image-registry-credentials --ignore-not-found
kubectl create secret -n cf docker-registry image-registry-credentials \
--docker-server="$DOCKER_SERVER" \
--docker-server="$docker_server" \
--docker-username="$DOCKER_USERNAME" \
--docker-password="$DOCKER_PASSWORD"
}
Expand Down
Loading