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

Allow creating a kind cluster from a custom K8s branch #80

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

klueska
Copy link
Collaborator

@klueska klueska commented Mar 4, 2024

No description provided.

@klueska klueska requested a review from elezar March 4, 2024 13:31
@klueska klueska self-assigned this Mar 4, 2024
@@ -38,6 +38,7 @@ DRIVER_IMAGE_VERSION=$(from_versions_mk "VERSION")
# The kubernetes tag to build the kind cluster from
# From https://github.com/kubernetes/kubernetes/tags
# See also https://hub.docker.com/r/kindest/node/tags
: ${KIND_K8S_REPO:="https://github.com/kubernetes/kubernetes.git"}
Copy link
Member

Choose a reason for hiding this comment

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

When I tried this locally, there were issues with extracting the version as below since we're doing a shallow-clone. Were you able to get around this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What do you mean exactly by "issues with extracting the version as below"?

I didn't have any issues. The only place this variable is even used is in build-kind-image.sh, so now this just allows what used to be hard-coded there to be overwritten.

Copy link
Member

Choose a reason for hiding this comment

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

Let's say that you want to check out a branch:

KIND_K8S_REPO=https://github.com/pohly/kubernetes \
KIND_K8S_TAG=dra-structured-parameters \
    ./demo/clusters/kind/create-cluster.sh

Since we do a shallow clone of the repo and this does not contain tag information the kubernets build fails.

I was able to get around this locally in initial testing by setting KUBE_GIT_VERSION=v1.30.0 in addition to the envvars above. This could also be addressed by:

  1. Building a full repo clone that's already checked out instead.
  2. "unshallowing" the clone so that git describe --tags returns some sane version string in the repo.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am also setting KUBE_GIT_VERSION=v1.30.0 (because this is what you told me to do in slack). I never tried without it (nor really attempted to understand why it was necessary, apparently).

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.

2 participants