diff --git a/go.mod b/go.mod index 5e2f8d7d1..3cdf1b89e 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( k8s.io/apimachinery v0.29.2 k8s.io/client-go v0.29.2 knative.dev/hack v0.0.0-20240404013450-1133b37da8d7 - knative.dev/networking v0.0.0-20240410133143-200296131672 + knative.dev/networking v0.0.0-20240410205709-a3d8b0fc9cd2 knative.dev/pkg v0.0.0-20240409141558-1ff9a77566f6 ) diff --git a/go.sum b/go.sum index 803625135..1b1071198 100644 --- a/go.sum +++ b/go.sum @@ -695,8 +695,8 @@ k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCf k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= knative.dev/hack v0.0.0-20240404013450-1133b37da8d7 h1:fkWYWvdHm1mVHevKW2vVJnZtxH0NzOlux8imesweKwE= knative.dev/hack v0.0.0-20240404013450-1133b37da8d7/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= -knative.dev/networking v0.0.0-20240410133143-200296131672 h1:BGHRJN0RzLbB+HMUUUDWLd5ShzLRl+Pk1OV6mMQCqCs= -knative.dev/networking v0.0.0-20240410133143-200296131672/go.mod h1:m9aH65g5JGuwhH6moqAmF0+X6PvIQwElVx5dw2+jDno= +knative.dev/networking v0.0.0-20240410205709-a3d8b0fc9cd2 h1:W8M/cxPYUOIjNcwQ3w2Il/qlYKpZBPJ89ysTr5MTI/A= +knative.dev/networking v0.0.0-20240410205709-a3d8b0fc9cd2/go.mod h1:yXbBRuzGKDkHSdvqUT7/1j9br5gkJL9LAyxpHfcF3h8= knative.dev/pkg v0.0.0-20240409141558-1ff9a77566f6 h1:jJVStFc+y8c7veKYDyQFwQTod+w5pzZqopz/nLH2dJo= knative.dev/pkg v0.0.0-20240409141558-1ff9a77566f6/go.mod h1:ZWUA+Z6zFI93VyExtnH0P5JtVQ0TvWpKvbxtFvmRJ9I= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/vendor/knative.dev/networking/test/conformance/certificate/utils.go b/vendor/knative.dev/networking/test/conformance/certificate/utils.go index 362a21037..47bd26644 100644 --- a/vendor/knative.dev/networking/test/conformance/certificate/utils.go +++ b/vendor/knative.dev/networking/test/conformance/certificate/utils.go @@ -82,7 +82,7 @@ func WaitForCertificateSecret(ctx context.Context, t *testing.T, client *test.Cl span := logging.GetEmitableSpan(context.Background(), fmt.Sprintf("WaitForCertificateSecret/%s/%s", cert.Spec.SecretName, desc)) defer span.End() - return wait.PollImmediate(test.PollInterval, test.PollTimeout, func() (bool, error) { + return wait.PollUntilContextTimeout(ctx, test.PollInterval, test.PollTimeout, true, func(ctx context.Context) (bool, error) { secret, err := client.KubeClient.CoreV1().Secrets(test.ServingNamespace).Get(ctx, cert.Spec.SecretName, metav1.GetOptions{}) if apierrs.IsNotFound(err) { return false, nil @@ -119,7 +119,7 @@ func WaitForCertificateState(ctx context.Context, client *test.NetworkingClients defer span.End() var lastState *v1alpha1.Certificate - return wait.PollImmediate(test.PollInterval, test.PollTimeout, func() (bool, error) { + return wait.PollUntilContextTimeout(ctx, test.PollInterval, test.PollTimeout, true, func(ctx context.Context) (bool, error) { var err error lastState, err = client.Certificates.Get(ctx, name, metav1.GetOptions{}) if err != nil { diff --git a/vendor/knative.dev/networking/test/ingress.go b/vendor/knative.dev/networking/test/ingress.go index a8cfd0d14..ef6a3faaa 100644 --- a/vendor/knative.dev/networking/test/ingress.go +++ b/vendor/knative.dev/networking/test/ingress.go @@ -35,7 +35,7 @@ func WaitForIngressState(ctx context.Context, client *NetworkingClients, name st defer span.End() var lastState *v1alpha1.Ingress - waitErr := wait.PollImmediate(PollInterval, PollTimeout, func() (bool, error) { + waitErr := wait.PollUntilContextTimeout(ctx, PollInterval, PollTimeout, true, func(ctx context.Context) (bool, error) { var err error lastState, err = client.Ingresses.Get(ctx, name, metav1.GetOptions{}) if err != nil { diff --git a/vendor/knative.dev/networking/test/test_images/runtime/handlers/handler.go b/vendor/knative.dev/networking/test/test_images/runtime/handlers/handler.go index 9c96b9ede..76fde7046 100644 --- a/vendor/knative.dev/networking/test/test_images/runtime/handlers/handler.go +++ b/vendor/knative.dev/networking/test/test_images/runtime/handlers/handler.go @@ -24,16 +24,13 @@ import ( "strings" nethttp "knative.dev/networking/pkg/http" - "knative.dev/networking/pkg/http/probe" "knative.dev/pkg/network" ) // InitHandlers initializes all handlers. func InitHandlers(mux *http.ServeMux) { mux.HandleFunc("/", withHeaders(withRequestLog(runtimeHandler))) - - h := probe.NewHandler(withRequestLog(withKubeletProbeHeaderCheck)) - mux.HandleFunc(nethttp.HealthCheckPath, h.ServeHTTP) + mux.HandleFunc(nethttp.HealthCheckPath, withRequestLog(withKubeletProbeHeaderCheck)) } // withRequestLog logs each request before handling it. diff --git a/vendor/knative.dev/networking/test/test_images/runtime/main.go b/vendor/knative.dev/networking/test/test_images/runtime/main.go index b860e7ea7..309a5d9f4 100644 --- a/vendor/knative.dev/networking/test/test_images/runtime/main.go +++ b/vendor/knative.dev/networking/test/test_images/runtime/main.go @@ -22,6 +22,7 @@ import ( "net/http" "os" + "knative.dev/networking/pkg/http/probe" "knative.dev/networking/test" "knative.dev/networking/test/test_images/runtime/handlers" ) @@ -48,11 +49,13 @@ func main() { mux := http.NewServeMux() handlers.InitHandlers(mux) + h := probe.NewHandler(mux) + if cert, key := os.Getenv("CERT"), os.Getenv("KEY"); cert != "" && key != "" { log.Print("Server starting on port with TLS ", port) - test.ListenAndServeTLSGracefullyWithHandler(cert, key, ":"+port, mux) + test.ListenAndServeTLSGracefullyWithHandler(cert, key, ":"+port, h) } else { log.Print("Server starting on port ", port) - test.ListenAndServeGracefullyWithHandler(":"+port, mux) + test.ListenAndServeGracefullyWithHandler(":"+port, h) } } diff --git a/vendor/modules.txt b/vendor/modules.txt index 3be1d5b0e..93d5f3131 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -909,7 +909,7 @@ k8s.io/utils/trace # knative.dev/hack v0.0.0-20240404013450-1133b37da8d7 ## explicit; go 1.18 knative.dev/hack -# knative.dev/networking v0.0.0-20240410133143-200296131672 +# knative.dev/networking v0.0.0-20240410205709-a3d8b0fc9cd2 ## explicit; go 1.21 knative.dev/networking/config knative.dev/networking/pkg/apis/networking