From f31d81bee0d82ec9ecabb9a25451f608b1987a53 Mon Sep 17 00:00:00 2001 From: Nghia Tran Date: Thu, 26 Jul 2018 15:27:22 -0700 Subject: [PATCH] Change our configurations to work with Istio 1.0 validation. - Set a default TLS mode. - Change header names to lowercase. --- config/202-gateway.yaml | 2 ++ pkg/controller/names.go | 4 ++-- pkg/controller/route/resources/virtual_service_test.go | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/config/202-gateway.yaml b/config/202-gateway.yaml index 41936efdb228..8e4c75a69363 100644 --- a/config/202-gateway.yaml +++ b/config/202-gateway.yaml @@ -34,6 +34,8 @@ spec: protocol: HTTPS hosts: - "*" + tls: + mode: PASSTHROUGH --- # This is the Service definition for the ingress pods serving # Knative's shared Gateway. diff --git a/pkg/controller/names.go b/pkg/controller/names.go index 86e1fdd5b4d0..646e8afd2996 100644 --- a/pkg/controller/names.go +++ b/pkg/controller/names.go @@ -29,9 +29,9 @@ func GetServingK8SServiceNameForObj(name string) string { } func GetRevisionHeaderName() string { - return "Knative-Serving-Revision" + return "knative-serving-revision" } func GetRevisionHeaderNamespace() string { - return "Knative-Serving-Namespace" + return "knative-serving-namespace" } diff --git a/pkg/controller/route/resources/virtual_service_test.go b/pkg/controller/route/resources/virtual_service_test.go index d2627089a38b..bf20e1f63c3b 100644 --- a/pkg/controller/route/resources/virtual_service_test.go +++ b/pkg/controller/route/resources/virtual_service_test.go @@ -317,8 +317,8 @@ func TestMakeVirtualServiceRoute_VanillaScaledToZero(t *testing.T) { Weight: 100, }}, AppendHeaders: map[string]string{ - "Knative-Serving-Revision": "revision", - "Knative-Serving-Namespace": "test-ns", + "knative-serving-revision": "revision", + "knative-serving-namespace": "test-ns", IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue, }, Timeout: DefaultActivatorTimeout, @@ -360,8 +360,8 @@ func TestMakeVirtualServiceRoute_TwoInactiveTargets(t *testing.T) { Weight: 100, }}, AppendHeaders: map[string]string{ - "Knative-Serving-Revision": "revision", - "Knative-Serving-Namespace": "test-ns", + "knative-serving-revision": "revision", + "knative-serving-namespace": "test-ns", IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue, }, Timeout: DefaultActivatorTimeout,