You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After I commented out k8s.io/kubernetes v1.29.3 in go.mod, errors disappeared and all dependencies got resolved. Not sure whether it is a bug or I missed something.
Any help will be appreciated.
Provide a link to the example/module related to the question
I recently encountered the same problem, and I solved it in the following way.
Create script get.sh in the go.mod directory.
Then execute bash get.sh v1.20.4 (here select the k8s version you need to use)
#!/bin/sh
set -euo pipefail
VERSION=${1#"v"}
if [ -z "$VERSION" ]; then
echo "Must specify version!"
exit 1
fi
MODS=($(
curl -sS https://raw.githubusercontent.com/kubernetes/kubernetes/v${VERSION}/go.mod |
sed -n 's|.*k8s.io/\(.*\) => ./staging/src/k8s.io/.*|k8s.io/\1|p'
))
for MOD in "${MODS[@]}"; do
V=$(
go mod download -json "${MOD}@kubernetes-${VERSION}" |
sed -n 's|.*"Version": "\(.*\)".*|\1|p'
)
go mod edit "-replace=${MOD}=${MOD}@${V}"
done
go get "k8s.io/kubernetes@v${VERSION}"
I recently encountered the same problem, and I solved it in the following way. Create script get.sh in the go.mod directory. Then execute bash get.sh v1.20.4 (here select the k8s version you need to use)
#!/bin/sh
set -euo pipefail
VERSION=${1#"v"}
if [ -z "$VERSION" ]; then
echo "Must specify version!"
exit 1
fi
MODS=($(
curl -sS https://raw.githubusercontent.com/kubernetes/kubernetes/v${VERSION}/go.mod |
sed -n 's|.*k8s.io/\(.*\) => ./staging/src/k8s.io/.*|k8s.io/\1|p'
))
for MOD in "${MODS[@]}"; do
V=$(
go mod download -json "${MOD}@kubernetes-${VERSION}" |
sed -n 's|.*"Version": "\(.*\)".*|\1|p'
)
go mod edit "-replace=${MOD}=${MOD}@${V}"
done
go get "k8s.io/kubernetes@v${VERSION}"
Please describe your question here
I opened the project with GoLand, and got some errors like
After I commented out
k8s.io/kubernetes v1.29.3
ingo.mod
, errors disappeared and all dependencies got resolved. Not sure whether it is a bug or I missed something.Any help will be appreciated.
Provide a link to the example/module related to the question
spark-operator/go.mod
Line 29 in 333ee0b
Additional context
I found some issues might be related to this one:
#1197
kubernetes/kubernetes#79384
The text was updated successfully, but these errors were encountered: