Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hack/.golint_failures
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 18 additions & 1 deletion hack/make-rules/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/*' \
Expand All @@ -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
)
}

Expand Down
7 changes: 3 additions & 4 deletions hack/make-rules/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"
Expand All @@ -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:-}"

Expand Down
5 changes: 4 additions & 1 deletion pkg/printers/internalversion/printers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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."},
Expand Down