Fix deploy-on-kind with docker hub as registry #2709
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Is there a related GitHub Issue?
No
What is this change about?
When using deploy-on-kind we default to using the local registry. In
case we want a custom registry we should export the following vars:
DOCKER_SERVER
DOCKER_USERNAME
DOCKER_PASSWORD
REPOSOTORY_PREFIX
KPACK_BUILDER_REPOSITORY
In the INSTALL.kind.md we advise that people use dockerhub as the
registry, but setting DOCKER_SERVER to index.docker.io would result in a
wrong image-registry-credentials secret as the .dockerconfigjson wants
https://index.docker.io/v1/ as the host name. On the other hand
REPOSOTORY_PREFIX should be
index.dpcker.io/username/ and KPACK_BUILDER_REPOSITORY should be
index.docker.io/username/kpack-builder`, i.e. they do not have thehttps scheme and the /v1 path suffix. The docker hub config json is very
picky about the server name and we need special treatment for this use
case to work
Does this PR introduce a breaking change?
No
Acceptance Steps
Running the following command results in an operational korifi cluster
DOCKER_SERVER=index.docker.io DOCKER_USERNAME= DOCKER_PASSWORD= REPOSITORY_PREFIX=index.docker.io// KPACK_BUILDER_REPOSITORY=index.docker.io//kpack-builder ./scripts/deploy-on-kind.sh korifi
Tag your pair, your PM, and/or team