diff --git a/ci/e2e_eks.groovy b/ci/e2e_eks.groovy index 5557ca5482..2ff10413d3 100644 --- a/ci/e2e_eks.groovy +++ b/ci/e2e_eks.groovy @@ -16,7 +16,7 @@ kind: Pod spec: containers: - name: main - image: gcr.io/k8s-testimages/kubekins-e2e:v20200311-1e25827-master + image: hub-new.pingcap.net/tidb-operator/kubekins-e2e:v20210808-1eaeec7-master command: - runner.sh - sleep diff --git a/ci/e2e_gke.groovy b/ci/e2e_gke.groovy index 3e4e90780d..b83874d1f7 100644 --- a/ci/e2e_gke.groovy +++ b/ci/e2e_gke.groovy @@ -16,7 +16,7 @@ kind: Pod spec: containers: - name: main - image: gcr.io/k8s-testimages/kubekins-e2e:v20200311-1e25827-master + image: hub-new.pingcap.net/tidb-operator/kubekins-e2e:v20210808-1eaeec7-master command: - runner.sh - sleep diff --git a/ci/e2e_kind.groovy b/ci/e2e_kind.groovy index a97b68903e..ba34af14fc 100644 --- a/ci/e2e_kind.groovy +++ b/ci/e2e_kind.groovy @@ -16,7 +16,7 @@ metadata: spec: containers: - name: main - image: gcr.io/k8s-testimages/kubekins-e2e:v20200311-1e25827-master + image: hub-new.pingcap.net/tidb-operator/kubekins-e2e:v20210808-1eaeec7-master command: - runner.sh # Clean containers on TERM signal in root process to avoid cgroup leaking. diff --git a/ci/pull_e2e_kind.groovy b/ci/pull_e2e_kind.groovy index 7d96f671a3..f6d2d24c41 100644 --- a/ci/pull_e2e_kind.groovy +++ b/ci/pull_e2e_kind.groovy @@ -37,7 +37,7 @@ metadata: spec: containers: - name: main - image: gcr.io/k8s-testimages/kubekins-e2e:v20200311-1e25827-master + image: hub-new.pingcap.net/tidb-operator/kubekins-e2e:v20210808-1eaeec7-master command: - runner.sh # Clean containers on TERM signal in root process to avoid cgroup leaking. @@ -52,13 +52,7 @@ spec: docker system prune -af || true } function setup_docker_mirror() { - cat > /etc/docker/daemon.json < /etc/docker/daemon.json < /dev/null 2>&1 && break - if [[ ${WAIT_N} -lt ${MAX_WAIT} ]]; then - WAIT_N=$((WAIT_N+1)) - echo "info; Waiting for docker to be ready, sleeping for ${WAIT_N} seconds." - sleep ${WAIT_N} - else - echo "info: Reached maximum attempts, not waiting any longer..." - break - fi - done - echo "info: done restarting docker" -} - -function e2e::__configure_docker_mirror_for_dind() { - echo "info: configure docker.io mirror '$DOCKER_IO_MIRROR' for DinD" -cat < /etc/docker/daemon.json.tmp -{ - "registry-mirrors": ["$DOCKER_IO_MIRROR"] -} -EOF - if diff /etc/docker/daemon.json.tmp /etc/docker/daemon.json 1>/dev/null 2>&1; then - echo "info: already configured" - rm /etc/docker/daemon.json.tmp - else - mv /etc/docker/daemon.json.tmp /etc/docker/daemon.json - e2e::__restart_docker - fi -} - # TODO: review this function e2e::create_kindconfig() { local tmpfile=${1} @@ -430,10 +393,6 @@ hack::ensure_kind hack::ensure_kubectl hack::ensure_helm -if [ -n "$DOCKER_IO_MIRROR" -a -n "${DOCKER_IN_DOCKER_ENABLED:-}" ]; then - e2e::__configure_docker_mirror_for_dind -fi - e2e::image_build kubetest2_args=( diff --git a/hack/run-in-container.sh b/hack/run-in-container.sh index 317751f8e3..87329fd6c0 100755 --- a/hack/run-in-container.sh +++ b/hack/run-in-container.sh @@ -144,5 +144,5 @@ docker run ${docker_args[@]} \ -v $ROOT:/go/src/github.com/pingcap/tidb-operator \ -w /go/src/github.com/pingcap/tidb-operator \ --entrypoint /usr/local/bin/runner.sh \ - gcr.io/k8s-testimages/kubekins-e2e:v20200311-1e25827-master \ + gcr.io/k8s-testimages/kubekins-e2e:v20210808-1eaeec7-master \ "${args[@]}" diff --git a/hack/tools/go.mod b/hack/tools/go.mod index 35f968b82a..0c3ac97ca5 100644 --- a/hack/tools/go.mod +++ b/hack/tools/go.mod @@ -1,6 +1,6 @@ module k8s.io/kubernetes/hack/tools -go 1.14 +go 1.16 require ( github.com/client9/misspell v0.3.4 diff --git a/hack/update-api-references.sh b/hack/update-api-references.sh index a4dd71f901..fb9d0fdc62 100755 --- a/hack/update-api-references.sh +++ b/hack/update-api-references.sh @@ -25,9 +25,12 @@ source hack/lib.sh hack::ensure_gen_crd_api_references_docs DOCS_PATH="$ROOT/docs/api-references" +API_DIR="${ROOT}/pkg/apis/pingcap/v1alpha1" -GOROOT=$(go env GOROOT) ${DOCS_BIN} \ - -config "$DOCS_PATH/config.json" \ - -template-dir "$DOCS_PATH/template" \ - -api-dir "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" \ - -out-file "$DOCS_PATH/docs.md" +pushd ${API_DIR} >/dev/null + GOROOT=$(go env GOROOT) ${DOCS_BIN} \ + -config "$DOCS_PATH/config.json" \ + -template-dir "$DOCS_PATH/template" \ + -api-dir "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" \ + -out-file "$DOCS_PATH/docs.md" +popd >/dev/null diff --git a/pkg/apis/go.mod b/pkg/apis/go.mod index dc1b06566f..61149ea5cb 100644 --- a/pkg/apis/go.mod +++ b/pkg/apis/go.mod @@ -1,6 +1,6 @@ module github.com/pingcap/tidb-operator/pkg/apis -go 1.13 +go 1.16 require ( github.com/BurntSushi/toml v0.3.1 diff --git a/pkg/apis/go.sum b/pkg/apis/go.sum index 40124fd0ac..ac76858b6f 100644 --- a/pkg/apis/go.sum +++ b/pkg/apis/go.sum @@ -180,7 +180,6 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -548,7 +547,6 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/pkg/client/go.mod b/pkg/client/go.mod index 4bc311489a..879e8b414d 100644 --- a/pkg/client/go.mod +++ b/pkg/client/go.mod @@ -1,6 +1,6 @@ module github.com/pingcap/tidb-operator/pkg/client -go 1.13 +go 1.16 require ( github.com/pingcap/tidb-operator/pkg/apis v1.3.9 diff --git a/tools/tools.go b/tools/tools.go index 1295a2f8f2..fee3c4ae87 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build tools // +build tools // Tool dependencies are tracked here to make go module happy @@ -25,4 +26,7 @@ import ( // TODO remove this if we 1) avoid the issue in a better way or 2) go both // in local development and ci have the bug fixed _ "github.com/fatih/color" + + // in order to import the pkg in vendor + _ "github.com/zhouqiang-cl/gocovmerge" )