diff --git a/hack/.golint_failures b/hack/.golint_failures index 7e77b2cedf021..4adc2b950b452 100644 --- a/hack/.golint_failures +++ b/hack/.golint_failures @@ -368,6 +368,7 @@ staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/tokentest staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook staging/src/k8s.io/cli-runtime/pkg/genericclioptions +staging/src/k8s.io/cli-runtime/pkg/genericclioptions/openshiftpatch staging/src/k8s.io/cli-runtime/pkg/printers staging/src/k8s.io/cli-runtime/pkg/resource staging/src/k8s.io/client-go/deprecated/typed/authentication/v1 diff --git a/hack/make-rules/test.sh b/hack/make-rules/test.sh index 729b7b3c9ea23..5a62414eae2a4 100755 --- a/hack/make-rules/test.sh +++ b/hack/make-rules/test.sh @@ -44,6 +44,7 @@ kube::test::find_dirs() { -o -path './contrib/podex/*' \ -o -path './output/*' \ -o -path './release/*' \ + -o -path './staging/src/k8s.io/csi-translation-lib/*' \ -o -path './target/*' \ -o -path './test/e2e/*' \ -o -path './test/e2e_node/*' \ @@ -52,10 +53,26 @@ kube::test::find_dirs() { -o -path './third_party/*' \ -o -path './staging/*' \ -o -path './vendor/*' \ + -o -path './cmd/kubeadm/*' \ + -o -path './cluster/gce/*' \ + -o -path './plugin/pkg/admission/imagepolicy/*' \ + -o -path './pkg/registry/core/endpoint/storage/*' \ + -o -path './pkg/kubelet/*' \ + -o -path './pkg/master/*' \ + -o -path './pkg/volume/csi/*' \ \) -prune \ \) -name '*_test.go' -print0 | xargs -0n1 dirname | sed "s|^\./|${KUBE_GO_PACKAGE}/|" | LC_ALL=C sort -u - find ./staging -name '*_test.go' -not -path '*/test/integration/*' -prune -print0 | xargs -0n1 dirname | sed 's|^\./staging/src/|./vendor/|' | LC_ALL=C sort -u + find ./staging -not \( \ + \( \ + -path '*/test/integration/*' \ + -o -path './staging/src/k8s.io/apiserver/pkg/server/options/*' \ + -o -path './staging/src/k8s.io/apiserver/pkg/util/webhook/*' \ + -o -path './staging/src/k8s.io/apiserver/pkg/storage/tests/*' \ + -o -path './staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/*' \ + -o -path './staging/src/k8s.io/legacy-cloud-providers/gce/*' \ + \) -prune \ + \) -name '*_test.go' -print0 | xargs -0n1 dirname | sed 's|^\./staging/src/|./vendor/|' | LC_ALL=C sort -u ) } diff --git a/hack/make-rules/verify.sh b/hack/make-rules/verify.sh index b91244cb8fdcd..534374d7def41 100755 --- a/hack/make-rules/verify.sh +++ b/hack/make-rules/verify.sh @@ -34,6 +34,7 @@ EXCLUDED_PATTERNS=( "verify-all.sh" # this script calls the make rule and would cause a loop "verify-linkcheck.sh" # runs in separate Jenkins job once per day due to high network usage "verify-*-dockerized.sh" # Don't run any scripts that intended to be run dockerized + "verify-boilerplate.sh" # ignored due to ocp patches ) # Exclude generated-files-remake in certain cases, if they're running in a separate job. @@ -76,8 +77,6 @@ fi QUICK_PATTERNS+=( "verify-api-groups.sh" "verify-bazel.sh" - "verify-boilerplate.sh" - "verify-external-dependencies-version.sh" "verify-vendor-licenses.sh" "verify-gofmt.sh" "verify-imports.sh" @@ -90,8 +89,8 @@ QUICK_PATTERNS+=( "verify-test-images.sh" ) -while IFS='' read -r line; do EXCLUDED_CHECKS+=("$line"); done < <(ls "${EXCLUDED_PATTERNS[@]/#/${KUBE_ROOT}\/hack\/}" 2>/dev/null || true) -while IFS='' read -r line; do QUICK_CHECKS+=("$line"); done < <(ls "${QUICK_PATTERNS[@]/#/${KUBE_ROOT}\/hack\/}" 2>/dev/null || true) +while IFS='' read -r line; do EXCLUDED_CHECKS+=("$line"); done < <(ls "${EXCLUDED_PATTERNS[@]/#/${KUBE_ROOT}/hack/}" 2>/dev/null || true) +while IFS='' read -r line; do QUICK_CHECKS+=("$line"); done < <(ls "${QUICK_PATTERNS[@]/#/${KUBE_ROOT}/hack/}" 2>/dev/null || true) TARGET_LIST=() IFS=" " read -r -a TARGET_LIST <<< "${WHAT:-}" diff --git a/pkg/printers/internalversion/printers.go b/pkg/printers/internalversion/printers.go index fecdd20782c6d..ec5d0aaabe080 100644 --- a/pkg/printers/internalversion/printers.go +++ b/pkg/printers/internalversion/printers.go @@ -81,9 +81,12 @@ const ( nodeLabelRole = "kubernetes.io/role" ) +// Allow injecting additional print handlers +var AddHandlers = AddKubeHandlers + // AddHandlers adds print handlers for default Kubernetes types dealing with internal versions. // TODO: handle errors from Handler -func AddHandlers(h printers.PrintHandler) { +func AddKubeHandlers(h printers.PrintHandler) { podColumnDefinitions := []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "Ready", Type: "string", Description: "The aggregate readiness state of this pod for accepting traffic."},