From f91093f141e77ce35fcba057b8a21448da983ce4 Mon Sep 17 00:00:00 2001 From: knative-automation Date: Mon, 31 Jan 2022 07:53:30 -0800 Subject: [PATCH] upgrade to latest dependencies (#597) bumping knative.dev/hack 9b2ed84...51a42b2: > 51a42b2 Update community files (# 146) > 81ef5cc Update community files (# 145) > cfb3eb8 Enable opting out Preemptible/Spot GKE Worker Nodes (# 144) > 9dd1ec1 Look at package name when checking whether the shell package can be used (# 142) > f1822b1 Disable Logs/Metrics on GKE and Run Preemptible Nodes (# 138) > 32375dc remove clusteradmin grant (# 141) > 987528e Temporarily fix the unit tests for library.sh (# 143) > da09733 print commit hash (# 140) bumping knative.dev/pkg 77555ea...ca64d3b: > ca64d3b Update community files (# 2404) > 2783cd8 Do not block NotFound error during patching resources (# 2403) > d7b329c :bug: Update required Go version to 1.17 to fix # 2399 (# 2400) > 3ba5d72 Don't discard addressable resolver original errors (# 2395) Signed-off-by: Knative Automation --- go.mod | 4 ++-- go.sum | 7 +++--- vendor/knative.dev/hack/README.md | 5 +++++ vendor/knative.dev/hack/e2e-tests.sh | 3 --- vendor/knative.dev/hack/infra-library.sh | 26 +++++++++------------- vendor/knative.dev/hack/presubmit-tests.sh | 4 ++-- vendor/modules.txt | 4 ++-- 7 files changed, 26 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index 73d57b56..1a5eaf49 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,6 @@ require ( k8s.io/client-go v0.22.5 k8s.io/code-generator v0.22.5 k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c - knative.dev/hack v0.0.0-20220118141833-9b2ed8471e30 - knative.dev/pkg v0.0.0-20220118160532-77555ea48cd4 + knative.dev/hack v0.0.0-20220128200847-51a42b2eb63e + knative.dev/pkg v0.0.0-20220129160148-ca64d3b3ea8c ) diff --git a/go.sum b/go.sum index 46f9ed8f..a5e8fdc3 100644 --- a/go.sum +++ b/go.sum @@ -1108,10 +1108,11 @@ k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c h1:jvamsI1tn9V0S8jicyX82q k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a h1:8dYfu/Fc9Gz2rNJKB9IQRGgQOh2clmRzNIPPY1xLY5g= k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -knative.dev/hack v0.0.0-20220118141833-9b2ed8471e30 h1:UkNpCWCMM5C4AeQ8aTrPTuR/6OeARiqk+LEQ6tuMP7c= knative.dev/hack v0.0.0-20220118141833-9b2ed8471e30/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= -knative.dev/pkg v0.0.0-20220118160532-77555ea48cd4 h1:b9aXVrcfM/ajjHE/lGvlJOHZNAR5FF2TOTLWG7eMhzQ= -knative.dev/pkg v0.0.0-20220118160532-77555ea48cd4/go.mod h1:etVT7Tm8pSDf4RKhGk4r7j/hj3dNBpvT7bO6a6wpahs= +knative.dev/hack v0.0.0-20220128200847-51a42b2eb63e h1:pW3LMToyFhAhbHQWQwUHLY57i7gjvyFwFC8Sg6oNkJ8= +knative.dev/hack v0.0.0-20220128200847-51a42b2eb63e/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= +knative.dev/pkg v0.0.0-20220129160148-ca64d3b3ea8c h1:WaIYXRcQS1Nw5hHbuPk46cvoAdHiosC7eo2CpZcdKHo= +knative.dev/pkg v0.0.0-20220129160148-ca64d3b3ea8c/go.mod h1:BML2uvSEBhY/cpEsAyWv1+vLy2fxNk8VDJ9fT+D0tj4= pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/vendor/knative.dev/hack/README.md b/vendor/knative.dev/hack/README.md index a6a98c78..570f3709 100644 --- a/vendor/knative.dev/hack/README.md +++ b/vendor/knative.dev/hack/README.md @@ -167,6 +167,11 @@ This is a helper script for Knative E2E test scripts. To use it: 1. By default Istio is installed on the cluster via Addon, use `--skip-istio-addon` if you choose not to have it preinstalled. +1. By default Google Kubernetes Engine telemetry to Cloud Logging and Monitoring is disabled. + This can be enabled by setting `ENABLE_GKE_TELEMETRY` to `true`. + +1. By default Spot Worker nodes are disabled. This can be enabled by setting `ENABLE_PREEMPTIBLE_NODES` + to `true`. ### Sample end-to-end test script This script will test that the latest Knative Serving nightly release works. It diff --git a/vendor/knative.dev/hack/e2e-tests.sh b/vendor/knative.dev/hack/e2e-tests.sh index 537b3867..9178eac2 100644 --- a/vendor/knative.dev/hack/e2e-tests.sh +++ b/vendor/knative.dev/hack/e2e-tests.sh @@ -73,9 +73,6 @@ function setup_test_cluster() { is_protected_cluster "${k8s_cluster}" && \ abort "kubeconfig context set to ${k8s_cluster}, which is forbidden" - # Acquire cluster admin role for the current user. - acquire_cluster_admin_role "${k8s_cluster}" - # Setup KO_DOCKER_REPO if it is a GKE cluster. Incorporate an element of # randomness to ensure that each run properly publishes images. Don't # owerwrite KO_DOCKER_REPO if already set. diff --git a/vendor/knative.dev/hack/infra-library.sh b/vendor/knative.dev/hack/infra-library.sh index f87c259d..a96210e2 100644 --- a/vendor/knative.dev/hack/infra-library.sh +++ b/vendor/knative.dev/hack/infra-library.sh @@ -77,20 +77,6 @@ function dump_cluster_state() { echo "***************************************" } -# Sets the current user as cluster admin for the given cluster. -# Parameters: $1 - cluster context name -function acquire_cluster_admin_role() { - if [[ -z "$(kubectl get clusterrolebinding cluster-admin-binding 2> /dev/null)" ]]; then - if [[ "$1" =~ ^gke_.* ]]; then - kubectl create clusterrolebinding cluster-admin-binding \ - --clusterrole=cluster-admin --user="$(gcloud config get-value core/account)" - else - kubectl create clusterrolebinding cluster-admin-binding \ - --clusterrole=cluster-admin --user="prow" - fi - fi -} - # Create a test cluster and run the tests if provided. # Parameters: $1 - cluster provider name, e.g. gke # $2 - custom flags supported by kntest @@ -137,5 +123,15 @@ function create_gke_test_cluster() { local -n _custom_flags=$1 local -n _test_command=$2 - run_kntest kubetest2 gke "${_custom_flags[@]}" --test-command="${_test_command[*]}" + # We are disabling logs and metrics on Boskos Clusters by default as they are not used. Manually set ENABLE_GKE_TELEMETRY to true to enable telemetry + # and ENABLE_PREEMPTIBLE_NODES to true to create preemptible/spot VMs. VM Preemption is a rare event and shouldn't be distruptive given the fault tolerant nature of our tests. + local extra_gcloud_flags="" + if [[ "$ENABLE_GKE_TELEMETRY" != "true" ]]; then + extra_gcloud_flags="${extra_gcloud_flags} --logging=NONE --monitoring=NONE" + fi + + if [[ "$ENABLE_PREEMPTIBLE_NODES" == "true" ]]; then + extra_gcloud_flags="${extra_gcloud_flags} --preemptible" + fi + run_kntest kubetest2 gke "${_custom_flags[@]}" --test-command="${_test_command[*]}" --extra-gcloud-flags="${extra_gcloud_flags}" } diff --git a/vendor/knative.dev/hack/presubmit-tests.sh b/vendor/knative.dev/hack/presubmit-tests.sh index 70a399c8..08bd85d4 100644 --- a/vendor/knative.dev/hack/presubmit-tests.sh +++ b/vendor/knative.dev/hack/presubmit-tests.sh @@ -266,8 +266,6 @@ function main() { git version echo ">> ko version" [[ -f /ko_version ]] && cat /ko_version || echo "unknown" - echo ">> bazel version" - [[ -f /bazel_version ]] && cat /bazel_version || echo "unknown" if [[ "${DOCKER_IN_DOCKER_ENABLED}" == "true" ]]; then echo ">> docker version" docker version @@ -281,6 +279,8 @@ function main() { echo ">> maven version" mvn --version fi + echo ">> prow-tests image version" + [[ -f /commit_hash ]] && echo "Prow test image was built from $(cat /commit_hash) commit which is viewable at https://github.com/knative/test-infra/tree/$(cat /commit_hash) " || echo "unknown" fi [[ -z ${1:-} ]] && set -- "--all-tests" diff --git a/vendor/modules.txt b/vendor/modules.txt index 1dbad23c..a3b89bc3 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -579,10 +579,10 @@ k8s.io/kube-openapi/pkg/validation/spec k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/trace -# knative.dev/hack v0.0.0-20220118141833-9b2ed8471e30 +# knative.dev/hack v0.0.0-20220128200847-51a42b2eb63e ## explicit knative.dev/hack -# knative.dev/pkg v0.0.0-20220118160532-77555ea48cd4 +# knative.dev/pkg v0.0.0-20220129160148-ca64d3b3ea8c ## explicit knative.dev/pkg/apis knative.dev/pkg/apis/duck