-
Notifications
You must be signed in to change notification settings - Fork 45
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Kevin Klues <[email protected]>
@@ -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"} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
- Building a full repo clone that's already checked out instead.
- "unshallowing" the clone so that
git describe --tags
returns some sane version string in the repo.
There was a problem hiding this comment.
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).
No description provided.