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: update-kind-example-to-containerd_1.5 #1483

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

dmitrynovik
Copy link

@dmitrynovik dmitrynovik commented Feb 13, 2024

What this PR does / why we need it:

Adjusted the example of running the kapp-controller in kind for the containerd 1.5+

The example supplied in this repository, kapp-controller in kind, no longer works with my containerd://1.7.1 - the pods are scheduled and created, but there are image pull errors as every pod tries to pull image over HTTPS instead of HTTP ( as in this StackOverflow example).

I believe this change happened in containerd v1.5 as each container needs a hosts.toml file.
This new requirement is also reflected in project kind: create a local registry, note a new step which is missing in the 2 year old kind-with-registry.sh script:

# 3. Add the registry config to the nodes
#
# This is necessary because localhost resolves to loopback addresses that are
# network-namespace local.
# In other words: localhost in the container is not localhost on the host.
#
# We want a consistent name that works from both ends, so we tell containerd to
# alias localhost:${reg_port} to the registry container when pulling images
REGISTRY_DIR="/etc/containerd/certs.d/localhost:${reg_port}"
for node in $(kind get nodes); do
  docker exec "${node}" mkdir -p "${REGISTRY_DIR}"
  cat <<EOF | docker exec -i "${node}" cp /dev/stdin "${REGISTRY_DIR}/hosts.toml"
[host."http://${reg_name}:5000"]
EOF
done

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?

NONE
-->


Additional Notes for your reviewer:

Review Checklist:
  • Follows the developer guidelines
  • Relevant tests are added or updated
  • Relevant docs in this repo added or updated
  • Relevant carvel.dev docs added or updated in a separate PR and there's
    a link to that PR
  • Code is at least as readable and maintainable as it was before this
    change

Additional documentation e.g., Proposal, usage docs, etc.:


Copy link
Member

@praveenrewar praveenrewar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making the contribution. Could you please sign your commits to make the DCO bot happy, we can merge the PR then.

@dmitrynovik dmitrynovik force-pushed the feature/update-kind-example-to-containerd_1.5 branch from aaa63b5 to 6174e8c Compare February 15, 2024 02:57
rohitagg2020 and others added 6 commits February 15, 2024 13:57
…troller-sidecarexec containers

Signed-off-by: rohitagg2020 <rohit.aggarwal2020@gmail.com>
Signed-off-by: dmitrynovik <dmitry.novik@gmail.com>
…d. Add wait flags to pkg i pause.

Signed-off-by: Soumik Majumder <soumikm@vmware.com>
Signed-off-by: dmitrynovik <dmitry.novik@gmail.com>
column will be visible when --wide flag is set to true

Signed-off-by: Premkumar Bhaskal <pbhaskal@gmail.com>
Signed-off-by: dmitrynovik <dmitry.novik@gmail.com>
Signed-off-by: dmitrynovik <dmitry.novik@gmail.com>
Signed-off-by: dmitrynovik <dmitry.novik@gmail.com>
Signed-off-by: dmitrynovik <dmitry.novik@gmail.com>
@dmitrynovik dmitrynovik force-pushed the feature/update-kind-example-to-containerd_1.5 branch from 6174e8c to c8e3018 Compare February 15, 2024 02:57
@praveenrewar
Copy link
Member

@dmitrynovik I think the rebase didn't work so there are some commits coming up from develop. Could you please take a look at it?
(You might have to do a reset before rebase and then rebase again)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

6 participants