1.21

问题

  1. K8S go.mod中包含k8s.io库且使用本地的staging库replace。但是在go mod tidy时仍然会下载k8s.io库

    将staging/k8s.io中代码赋值到vendor的对应目录

go env -w GOPROXY=https://artsz.zte.com.cn/artifactory/goproxycn-go-virtual

// This is a generated file. Do not edit directly.  
// Ensure you've carefully read  
// https://git.k8s.io/community/contributors/devel/sig-architecture/vendor.md  
// Run hack/pin-dependency.sh to change pinned dependency versions.  
// Run hack/update-vendor.sh to update go.mod files and the vendor directory.  
  
module k8s.io/kubernetes  
  
go 1.16  
  
require (  
    k8s.io/api v0.0.0  
)  
  
replace (  
    k8s.io/api => ./staging/src/k8s.io/api  
)
posted @ 2025-04-22 16:21  40207123  阅读(24)  评论(0)    收藏  举报