From fd81a612d5b9d4521d649d326822b0e77a60a8a0 Mon Sep 17 00:00:00 2001 From: dprotaso Date: Wed, 17 Nov 2021 09:00:53 -0500 Subject: [PATCH] bump knative.dev/networking --- go.mod | 4 ++-- go.sum | 8 ++++---- .../pkg/apis/networking/register.go | 20 +++++++++++++++---- .../pkg/test/spoof/error_checks.go | 6 ++++++ vendor/knative.dev/pkg/test/spoof/spoof.go | 10 +++++++++- vendor/modules.txt | 4 ++-- 6 files changed, 39 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 71e56e326a3c..2057bf3d363e 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 // indirect knative.dev/caching v0.0.0-20211115071956-9b162819cccf knative.dev/hack v0.0.0-20211112192837-128cf0150a69 - knative.dev/networking v0.0.0-20211117003433-f0eb667e45bf - knative.dev/pkg v0.0.0-20211116213053-d82be484e4c3 + knative.dev/networking v0.0.0-20211117141434-4d634effa7b7 + knative.dev/pkg v0.0.0-20211117100634-54071addcdb8 sigs.k8s.io/yaml v1.3.0 ) diff --git a/go.sum b/go.sum index cec5c035f1cb..c60f9021754e 100644 --- a/go.sum +++ b/go.sum @@ -1609,11 +1609,11 @@ knative.dev/caching v0.0.0-20211115071956-9b162819cccf/go.mod h1:9tRNvYoEZEZt6tp knative.dev/hack v0.0.0-20211108170701-96aac1c30be3/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= knative.dev/hack v0.0.0-20211112192837-128cf0150a69 h1:/3NW6B9VeqAwpW0ZAS+8xLfwgVMIqH+CPmesDATovhk= knative.dev/hack v0.0.0-20211112192837-128cf0150a69/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= -knative.dev/networking v0.0.0-20211117003433-f0eb667e45bf h1:nGjj49YA66twzvssgzHZTzhOAbR2CrCwBM2ec/BAta4= -knative.dev/networking v0.0.0-20211117003433-f0eb667e45bf/go.mod h1:+MZjHIMRatw4Nf2U9xDJBStXUDcdjAcbrZL7iGU6tjY= +knative.dev/networking v0.0.0-20211117141434-4d634effa7b7 h1:teeoQe15N0VpxIdQ45tfXK786rPs1tIfuyS20rGdcCM= +knative.dev/networking v0.0.0-20211117141434-4d634effa7b7/go.mod h1:llkl8XkuVxcdm/FJvPfOSscb6IrOyATQ1fpCQ/uFwuE= knative.dev/pkg v0.0.0-20211111114938-0b0c3390a475/go.mod h1:plYIuKk6WNC9LyiG/9xBnOBYuxO0Ro6xN0z7iXWVUtk= -knative.dev/pkg v0.0.0-20211116213053-d82be484e4c3 h1:kJKOHViOLjLx1VpBVs5uJFSXTVEdyQylaHOJCU4AVVY= -knative.dev/pkg v0.0.0-20211116213053-d82be484e4c3/go.mod h1:VqUp1KWJqpTDNoiSI/heaX3uMdubImslJE2tBkP+Bbw= +knative.dev/pkg v0.0.0-20211117100634-54071addcdb8 h1:wpZDf2oNNPqhgGCvfBMyroXtAXoxyovRswXu0emmN8Q= +knative.dev/pkg v0.0.0-20211117100634-54071addcdb8/go.mod h1:VqUp1KWJqpTDNoiSI/heaX3uMdubImslJE2tBkP+Bbw= pgregory.net/rapid v0.3.3 h1:jCjBsY4ln4Atz78QoBWxUEvAHaFyNDQg9+WU62aCn1U= pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/vendor/knative.dev/networking/pkg/apis/networking/register.go b/vendor/knative.dev/networking/pkg/apis/networking/register.go index ec18c4bc0085..204e72d73ba7 100644 --- a/vendor/knative.dev/networking/pkg/apis/networking/register.go +++ b/vendor/knative.dev/networking/pkg/apis/networking/register.go @@ -74,10 +74,6 @@ const ( // Cert-Manager-based Certificate will reconcile into a Cert-Manager Certificate). CertificateClassAnnotationKey = "networking.knative.dev/certificate.class" - // DisableWildcardCertLabelKey is the label key attached to a namespace to indicate that - // a wildcard certificate should be not created for it. - DisableWildcardCertLabelKey = "networking.knative.dev/disableWildcardCert" - // WildcardCertDomainLabelKey is the label key attached to a certificate to indicate the // domain for which it was issued. WildcardCertDomainLabelKey = "networking.knative.dev/wildcardDomain" @@ -88,3 +84,19 @@ var ( // DefaultRetryCount will be set if Attempts not specified. DefaultRetryCount = 3 ) + +func GetIngressClass(annotations map[string]string) (val string) { + return annotations[IngressClassAnnotationKey] +} + +func GetCertificateClass(annotations map[string]string) (val string) { + return annotations[CertificateClassAnnotationKey] +} + +func GetHTTPProtocol(annotations map[string]string) (val string) { + return annotations[HTTPOptionAnnotationKey] +} + +func GetDisableAutoTLS(annotations map[string]string) (val string) { + return annotations[DisableAutoTLSAnnotationKey] +} diff --git a/vendor/knative.dev/pkg/test/spoof/error_checks.go b/vendor/knative.dev/pkg/test/spoof/error_checks.go index 378bf5824048..b0638ad3412e 100644 --- a/vendor/knative.dev/pkg/test/spoof/error_checks.go +++ b/vendor/knative.dev/pkg/test/spoof/error_checks.go @@ -21,6 +21,7 @@ package spoof import ( "errors" "net" + "net/http" "strings" ) @@ -62,3 +63,8 @@ func isConnectionReset(err error) bool { func isNoRouteToHostError(err error) bool { return err != nil && strings.Contains(err.Error(), "connect: no route to host") } + +func isResponseDNSError(resp *Response) bool { + // no such host with 502 is sent back from istio-ingressgateway when it fails to resolve domain. + return resp.StatusCode == http.StatusBadGateway && strings.Contains(string(resp.Body), "no such host") +} diff --git a/vendor/knative.dev/pkg/test/spoof/spoof.go b/vendor/knative.dev/pkg/test/spoof/spoof.go index f2baa4edf1c4..147a64adc709 100644 --- a/vendor/knative.dev/pkg/test/spoof/spoof.go +++ b/vendor/knative.dev/pkg/test/spoof/spoof.go @@ -164,7 +164,7 @@ func (sc *SpoofingClient) Do(req *http.Request, errorRetryCheckers ...interface{ // If no retry checkers are specified `DefaultErrorRetryChecker` will be used. func (sc *SpoofingClient) Poll(req *http.Request, inState ResponseChecker, checkers ...interface{}) (*Response, error) { if len(checkers) == 0 { - checkers = []interface{}{ErrorRetryChecker(DefaultErrorRetryChecker)} + checkers = []interface{}{ErrorRetryChecker(DefaultErrorRetryChecker), ResponseRetryChecker(DefaultResponseRetryChecker)} } var resp *Response @@ -255,6 +255,14 @@ func DefaultErrorRetryChecker(err error) (bool, error) { return false, err } +// DefaultResponseRetryChecker implements the defaults for retrying on response. +func DefaultResponseRetryChecker(resp *Response) (bool, error) { + if isResponseDNSError(resp) { + return true, fmt.Errorf("retrying for DNS related failure response: %v", resp) + } + return false, nil +} + // logZipkinTrace provides support to log Zipkin Trace for param: spoofResponse // We only log Zipkin trace for HTTP server errors i.e for HTTP status codes between 500 to 600 func (sc *SpoofingClient) logZipkinTrace(spoofResp *Response) { diff --git a/vendor/modules.txt b/vendor/modules.txt index 2ab9cf141e2f..f22315be23a4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1016,7 +1016,7 @@ knative.dev/caching/pkg/client/listers/caching/v1alpha1 ## explicit knative.dev/hack knative.dev/hack/shell -# knative.dev/networking v0.0.0-20211117003433-f0eb667e45bf +# knative.dev/networking v0.0.0-20211117141434-4d634effa7b7 ## explicit knative.dev/networking/config knative.dev/networking/pkg @@ -1046,7 +1046,7 @@ knative.dev/networking/pkg/client/injection/reconciler/networking/v1alpha1/serve knative.dev/networking/pkg/client/listers/networking/v1alpha1 knative.dev/networking/pkg/ingress knative.dev/networking/pkg/prober -# knative.dev/pkg v0.0.0-20211116213053-d82be484e4c3 +# knative.dev/pkg v0.0.0-20211117100634-54071addcdb8 ## explicit knative.dev/pkg/apiextensions/storageversion knative.dev/pkg/apiextensions/storageversion/cmd/migrate