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

Conversation

georgethebeatle
Copy link
Member

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 the
https 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

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 the
https 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

Co-authored-by: Georgi Sabev <georgethebeatle@gmail.com>
@danail-branekov danail-branekov merged commit 167d02a into main Jul 19, 2023
7 checks passed
@danail-branekov danail-branekov deleted the fix-deploy-on-kind branch July 19, 2023 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants