Skip to content

Commit

Permalink
bump knative.dev/networking
Browse files Browse the repository at this point in the history
  • Loading branch information
dprotaso committed Nov 17, 2021
1 parent 7e71496 commit fd81a61
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 13 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
20 changes: 16 additions & 4 deletions vendor/knative.dev/networking/pkg/apis/networking/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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]
}
6 changes: 6 additions & 0 deletions vendor/knative.dev/pkg/test/spoof/error_checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package spoof
import (
"errors"
"net"
"net/http"
"strings"
)

Expand Down Expand Up @@ -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")
}
10 changes: 9 additions & 1 deletion vendor/knative.dev/pkg/test/spoof/spoof.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fd81a61

Please sign in to comment.