Closed 0xMALVEE closed 1 month ago
That looks like a problem with the git
configuration. Are your github SSH keys configured properly? Is there some additional configuration tweaks your ~/.gitconfig
contains?
That looks like a problem with the
git
configuration. Are your github SSH keys configured properly? Is there some additional configuration tweaks your~/.gitconfig
contains?
hey @roman-kiselenko , thanks for looking into it. Yes my github ssh keys are ok nothing additionally tweeks. Maybe it has something to do with golang?
my ~/.gitconfig
[user]
name = 0xMALVEE
email = m.alvee8141@gmail.com
@0xMALVEE could you post go env
output?
@0xMALVEE could you post
go env
output?
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/alvee/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/alvee/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.3'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3685774116=/tmp/go-build -gno-record-gcc-switches'
Could you check what
cat .git/config
returns in $GOPATH/src/k8s.io/kubernetes
?
Could you check what
cat .git/config
returns in
$GOPATH/src/k8s.io/kubernetes
?
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://github.com/0xMALVEE/kubernetes.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "upstream"]
url = https://github.com/kubernetes/kubernetes.git
fetch = +refs/heads/*:refs/remotes/upstream/*
pushurl = no_push
I think you need to add this:
[url "ssh://git@github.com/"]
insteadOf = https://github.com/
To your ~/.gitconfig
Or change it in the repository with git remote set-url origin git@github.com:OWNER/REPOSITORY.git.
So it looks like url = git@github.com:0xMALVEE/kubernetes.git
.
I bet go
is confused with the https
part in the repo URL.
I'm not sure SSH vs HTTPS makes a difference here, but worth a shot.
It seems more like it is not able to get git information. It could be a shallow clone that is missing some detail. You could try git fetch upstream
from within the $GOPATH/src/k8s.io/kubernetes
directory to make sure it has all the information.
I think you need to add this:
[url "ssh://git@github.com/"] insteadOf = https://github.com/
To your
~/.gitconfig
Or change it in the repository with
git remote set-url origin git@github.com:OWNER/REPOSITORY.git.
So it looks like
url = git@github.com:0xMALVEE/kubernetes.git
.I bet
go
is confused with thehttps
part in the repo URL.
tried didn't work same issue after changes following.
root@DESKTOP-E1SNL1U:/home/alvee/go/src/k8s.io/kubernetes# cat ~/.gitconfig
[user]
name = 0xMALVEE
email = m.alvee8141@gmail.com
[url "ssh://git@github.com/"]
insteadOf = https://github.com/
also tried git remote set-url origin git@github.com:0xMALVEE/kubernetes.git
I'm not sure SSH vs HTTPS makes a difference here, but worth a shot.
It seems more like it is not able to get git information. It could be a shallow clone that is missing some detail. You could try
git fetch upstream
from within the$GOPATH/src/k8s.io/kubernetes
directory to make sure it has all the information.
git fetch upstream
no luck. still same
Hmm, what do you get if you run:
git rev-parse --short HEAD
git describe --tags --abbrev=0
inside that directory?
git describe --tags --abbrev=0
root@DESKTOP-E1SNL1U:/home/alvee/go/src/k8s.io/kubernetes# git rev-parse --short HEAD
8c1983ffc0b
root@DESKTOP-E1SNL1U:/home/alvee/go/src/k8s.io/kubernetes# git describe --tags --abbrev=0
v1.31.0-alpha.0
root@DESKTOP-E1SNL1U:/home/alvee/go/src/k8s.io/kubernetes#
BTW, it's not a bug in kind; it's something with your machine, and I guess it's something with git+ssh+go
, but I'm unsure what 🤔
Could you try to remove the Kubernetes source and clone it again?
$ rm -rf "$GOPATH"/src/k8s.io/kubernetes
$ mkdir -p "$GOPATH"/src/k8s.io/kubernetes
$ K8S_VERSION=v1.30.0
$ git clone --depth 1 --branch ${K8S_VERSION} https://github.com/kubernetes/kubernetes.git "$GOPATH"/src/k8s.io/kubernetes
BTW, it's not a bug in kind; it's something with your machine, and I guess it's something with
git+ssh+go
, but I'm unsure what 🤔Could you try to remove the Kubernetes source and clone it again?
$ rm -rf "$GOPATH"/src/k8s.io/kubernetes $ mkdir -p "$GOPATH"/src/k8s.io/kubernetes $ K8S_VERSION=v1.30.0 $ git clone --depth 1 --branch ${K8S_VERSION} https://github.com/kubernetes/kubernetes.git "$GOPATH"/src/k8s.io/kubernetes
now it's stuck at this point.
Note: hack/make-rules/build.sh
is from github.com/kubernetes/kubernetes, we're just invoking the Kubernetes build system twice:
1) ask it about the repo state to grab which version it will tag the build 2) build binaries
When Kubernetes is done building then we package it up into a kind node image.
The first failures were due to missing git clone data. The step here https://github.com/kubernetes-sigs/kind/issues/3623#issuecomment-2123006124, is Kubernetes preparing its build environment. It should be building a docker image.
It's possible something doesn't work right upstream in WSL.
I removed the folder again and cloned the master branch only this time and got this bellow saying version can't parse.
root@DESKTOP-E1SNL1U:/home/alvee/go/src/k8s.io/kubernetes# kind build node-image
Starting to build Kubernetes
Failed to build Kubernetes: failed to parse source version: could not parse "" as version
ERROR: error building node image: failed to build kubernetes: failed to parse source version: could not parse "" as version
Let me try to clone the entire k8s again and see if any changes.
I cloned the entire 1GB k8s again and set up upstream branches and stuff. Now it's going up to this point bellow and stuck in there.
root@DESKTOP-E1SNL1U:/home/alvee/go/src/k8s.io/kubernetes# kind build node-image
Starting to build Kubernetes
+++ [0521 23:06:21] Verifying Prerequisites....
+++ [0521 23:06:21] Building Docker image kube-build:build-3e87291206-5-v1.31.0-go1.22.3-bullseye.0
+++ [0521 23:06:23] Syncing sources to container
+++ [0521 23:06:25] Running build command...
+++ [0521 23:06:29] Building go targets for linux/amd64
k8s.io/kubernetes/cmd/kube-apiserver (static)
k8s.io/kubernetes/cmd/kube-controller-manager (static)
k8s.io/kubernetes/cmd/kube-proxy (static)
k8s.io/kubernetes/cmd/kube-scheduler (static)
k8s.io/kubernetes/cmd/kubeadm (static)
k8s.io/kubernetes/cmd/kubectl (static)
k8s.io/kubernetes/cmd/kubelet (non-static)
+++ [0521 23:06:36] Syncing out of container
+++ [0521 23:06:37] Building images: linux-amd64
+++ [0521 23:06:38] Starting docker build for image: kube-apiserver-amd64
+++ [0521 23:06:38] Starting docker build for image: kube-controller-manager-amd64
+++ [0521 23:06:38] Starting docker build for image: kube-scheduler-amd64
+++ [0521 23:06:38] Starting docker build for image: kube-proxy-amd64
+++ [0521 23:06:38] Starting docker build for image: kubectl-amd64
+++ [0521 23:06:41] Deleting docker image registry.k8s.io/kube-scheduler-amd64:v1.31.0-alpha.0.843_c0f4879164f3d5
+++ [0521 23:06:42] Deleting docker image registry.k8s.io/kubectl-amd64:v1.31.0-alpha.0.843_c0f4879164f3d5
+++ [0521 23:06:42] Deleting docker image registry.k8s.io/kube-controller-manager-amd64:v1.31.0-alpha.0.843_c0f4879164f3d5
+++ [0521 23:06:42] Deleting docker image registry.k8s.io/kube-proxy-amd64:v1.31.0-alpha.0.843_c0f4879164f3d5
+++ [0521 23:06:42] Deleting docker image registry.k8s.io/kube-apiserver-amd64:v1.31.0-alpha.0.843_c0f4879164f3d5
+++ [0521 23:06:42] Docker builds done
Finished building Kubernetes
Building node image ...
Building in container: kind-build-1716311205-1112095812
docker info of container and images.
hey everyone, it took an entire 22 minutes to build I guess it takes a longer time and I thought it was stuck. it's working now thank you guys for the support. It's working after I re-cloned k8s again. 🤣
What happened:
What you expected to happen:
Should build successfully
How to reproduce it (as minimally and precisely as possible):
kind build node-image
Anything else we need to know?:
Environment:
kind version
): kind v0.23.0 go1.21.10 linux/amd64docker info
,podman info
ornerdctl info
):Server: Containers: 2 Running: 1 Paused: 0 Stopped: 1 Images: 4 Server Version: 26.1.3 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Using metacopy: false Native Overlay Diff: true userxattr: false Logging Driver: json-file Cgroup Driver: cgroupfs Cgroup Version: 1 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog Swarm: inactive Runtimes: io.containerd.runc.v2 runc Default Runtime: runc Init Binary: docker-init containerd version: e377cd56a71523140ca6ae87e30244719194a521 runc version: v1.1.12-0-g51d5e94 init version: de40ad0 Security Options: seccomp Profile: builtin Kernel Version: 5.15.146.1-microsoft-standard-WSL2 Operating System: Ubuntu 22.04.3 LTS OSType: linux Architecture: x86_64 CPUs: 16 Total Memory: 15.5GiB Name: DESKTOP-E1SNL1U ID: c4864fcc-0f2d-4be6-b62d-ebea9d3c6f08 Docker Root Dir: /var/lib/docker Debug Mode: false Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false
WARNING: No blkio throttle.read_bps_device support WARNING: No blkio throttle.write_bps_device support WARNING: No blkio throttle.read_iops_device support WARNING: No blkio throttle.write_iops_device support
kubectl version
):