Repository: knative/serving
Pull request #8069 (2020-05-26 10:22:22)

Add activator's pod IP instead of serivce IP to tag
## Proposed Changes

Currently zipkin/jaeger client uses `activator-service` for exporter's
endpoint. Although It works, it has some problems:

e.g.
- UI shows activator's svc IP instead of endpoint IP. So we cannot debug when multiple endpoint pods exit.

![image](https://user-images.githubusercontent.com/2138339/89609517-1289fc80-d8b3-11ea-9c89-8d97130c7e21.png)

- If activator pod started earlier than actiator-service's DNS
registration, the tracing failed to configure. Please see error below:

`{"level":"error","ts":"2020-05-21T10:13:23.687Z","logger":"activator","caller":"activator/main.go:197","msg":"Unable to apply open census tracer config","knative.dev/controller":"activator","knative.dev/pod":"activator-7db4dc788c-k422r","error":"lookup activator-service on 172.30.0.10:53: no such host","stacktrace":"main.main.func2\n\t/opt/app-root/src/go/src/knative.dev/serving/cmd/activator/main.go:197\nknative.dev/serving/vendor/knative.dev/pkg/configmap.TypeFilter.func1.1\n\t/opt/app-root/src/go/src/knative.dev/serving/vendor/knative.dev/pkg/configmap/filter.go:45\nknative.dev/serving/vendor/knative.dev/pkg/configmap.(*UntypedStore).OnConfigChanged.func1\n\t/opt/app-root/src/go/src/knative.dev/serving/vendor/knative.dev/pkg/configmap/store.go:162"}`

Hence, this patch adds activator's pod IP to reporter and create a tag of the IP.

**Release Note**

```release-note
```

/lint


knative-prow-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative/serving/pull/8069#" title="Author self-approved">nak3</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **markusthoemmes**
You can assign the PR to them by writing `/assign @markusthoemmes` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative%2Fserving).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/knative/serving/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["markusthoemmes"]} -->
nak3: This is a PoC for https://github.com/knative/pkg/pull/1353.
knative-prow-robot: @nak3: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-serving-build-tests | 695eda95dcc727383786e76b60c04cc3e31a9903 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_serving/8069/pull-knative-serving-build-tests/1265226863089815552) | `/test pull-knative-serving-build-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_serving/8069). [Your PR dashboard](https://gubernator.knative.dev/pr/nak3).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow-robot: @nak3: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-serving-build-tests | 93fdad2f9634796e84def053c32d3f9d273ed40b | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_serving/8069/pull-knative-serving-build-tests/1280829627916357636) | `/test pull-knative-serving-build-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_serving/8069). [Your PR dashboard](https://gubernator.knative.dev/pr/nak3).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative/serving/pull/8069#" title="Author self-approved">nak3</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative%2Fserving).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[cmd/activator/OWNERS](https://github.com/knative/serving/blob/master/cmd/activator/OWNERS)~~ [nak3]
- ~~[cmd/queue/OWNERS](https://github.com/knative/serving/blob/master/cmd/queue/OWNERS)~~ [nak3]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
knative-prow-robot: @nak3: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-serving-integration-tests | e39382154b18ef73b5ac6269f416ba1725daa5a3 | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative_serving/8069/pull-knative-serving-integration-tests/1291594248184926213) | `/test pull-knative-serving-integration-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_serving/8069). [Your PR dashboard](https://gubernator.knative.dev/pr/nak3).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-test-reporter-robot: <!--[AUTOMATED-FLAKY-RETRYER]e39382154b18ef73b5ac6269f416ba1725daa5a3[AUTOMATED-FLAKY-RETRYER]-->
The following jobs failed:

Test name | Triggers | Retries
--- | --- | ---
pull-knative-serving-integration-tests |  | 0/3

Failed non-flaky tests preventing automatic retry of pull-knative-serving-integration-tests:

```
test/conformance/api/v1.TestContainerExitingMsg
test/conformance/api/v1.TestRevisionTimeout
test/conformance/api/v1beta1.TestContainerExitingMsg
test/conformance/api/v1beta1.TestRevisionTimeout
```

Patch:
diff --git a/cmd/activator/main.go b/cmd/activator/main.go
index 892e288a7..40f84a49c 100644
--- a/cmd/activator/main.go
+++ b/cmd/activator/main.go
@@ -169,7 +169,7 @@ func main() {
 	throttler := activatornet.NewThrottler(ctx, env.PodIP)
 	go throttler.Run(ctx)
 
-	oct := tracing.NewOpenCensusTracer(tracing.WithExporter(networking.ActivatorServiceName, logger))
+	oct := tracing.NewOpenCensusTracer(tracing.WithExporterFull(networking.ActivatorServiceName, env.PodIP, logger))
 
 	tracerUpdater := configmap.TypeFilter(&tracingconfig.Config{})(func(name string, value interface{}) {
 		cfg := value.(*tracingconfig.Config)
diff --git a/cmd/queue/main.go b/cmd/queue/main.go
index 100622566..dfbbee5b3 100644
--- a/cmd/queue/main.go
+++ b/cmd/queue/main.go
@@ -365,7 +365,7 @@ func buildTransport(env config, logger *zap.SugaredLogger) http.RoundTripper {
 		return pkgnet.AutoTransport
 	}
 
-	oct := tracing.NewOpenCensusTracer(tracing.WithExporter(env.ServingPod, logger))
+	oct := tracing.NewOpenCensusTracer(tracing.WithExporterFull(env.ServingPod, env.ServingPodIP, logger))
 	oct.ApplyConfig(&tracingconfig.Config{
 		Backend:              env.TracingConfigBackend,
 		Debug:                env.TracingConfigDebug,
diff --git a/pkg/reconciler/revision/reconcile_resources.go b/pkg/reconciler/revision/reconcile_resources.go
index ee53eb759..2a142eb85 100644
--- a/pkg/reconciler/revision/reconcile_resources.go
+++ b/pkg/reconciler/revision/reconcile_resources.go
@@ -97,10 +97,10 @@ func (c *Reconciler) reconcileDeployment(ctx context.Context, rev *v1.Revision)
 			for _, status := range pod.Status.ContainerStatuses {
 				if status.Name == rev.Spec.GetContainer().Name {
 					if t := status.LastTerminationState.Terminated; t != nil {
-						logger.Infof("%s marking exiting with: %d/%s", rev.Name, t.ExitCode, t.Message)
+						logger.Infof("marking exiting with: %d/%s", t.ExitCode, t.Message)
 						rev.Status.MarkContainerHealthyFalse(v1.ExitCodeReason(t.ExitCode), v1.RevisionContainerExitingMessage(t.Message))
 					} else if w := status.State.Waiting; w != nil && hasDeploymentTimedOut(deployment) {
-						logger.Infof("%s marking resources unavailable with: %s: %s", rev.Name, w.Reason, w.Message)
+						logger.Infof("marking resources unavailable with: %s: %s", w.Reason, w.Message)
 						rev.Status.MarkResourcesAvailableFalse(w.Reason, w.Message)
 					}
 					break
@@ -128,7 +128,6 @@ func (c *Reconciler) reconcileImageCache(ctx context.Context, rev *v1.Revision)
 		} else if err != nil {
 			return fmt.Errorf("failed to get image cache %q: %w", imageName, err)
 		}
-
 	}
 	return nil
 }
@@ -163,7 +162,7 @@ func (c *Reconciler) reconcilePA(ctx context.Context, rev *v1.Revision) error {
 
 		want := pa.DeepCopy()
 		want.Spec = tmpl.Spec
-		if pa, err = c.client.AutoscalingV1alpha1().PodAutoscalers(pa.Namespace).Update(want); err != nil {
+		if pa, err = c.client.AutoscalingV1alpha1().PodAutoscalers(ns).Update(want); err != nil {
 			return fmt.Errorf("failed to update PA %q: %w", paName, err)
 		}
 	}
diff --git a/pkg/reconciler/revision/revision.go b/pkg/reconciler/revision/revision.go
index 16f882395..90aa802f6 100644
--- a/pkg/reconciler/revision/revision.go
+++ b/pkg/reconciler/revision/revision.go
@@ -121,7 +121,6 @@ func (c *Reconciler) reconcileDigest(ctx context.Context, rev *v1.Revision) erro
 				Name:        container.Name,
 				ImageDigest: digest,
 			}
-
 			return nil
 		})
 	}
@@ -137,25 +136,11 @@ func (c *Reconciler) ReconcileKind(ctx context.Context, rev *v1.Revision) pkgrec
 	readyBeforeReconcile := rev.IsReady()
 	c.updateRevisionLoggingURL(ctx, rev)
 
-	phases := []struct {
-		name string
-		f    func(context.Context, *v1.Revision) error
-	}{{
-		name: "image digest",
-		f:    c.reconcileDigest,
-	}, {
-		name: "user deployment",
-		f:    c.reconcileDeployment,
-	}, {
-		name: "image cache",
-		f:    c.reconcileImageCache,
-	}, {
-		name: "PA",
-		f:    c.reconcilePA,
-	}}
-
-	for _, phase := range phases {
-		if err := phase.f(ctx, rev); err != nil {
+	for _, phase := range []func(context.Context, *v1.Revision) error{
+		c.reconcileDigest, c.reconcileDeployment,
+		c.reconcileImageCache, c.reconcilePA,
+	} {
+		if err := phase(ctx, rev); err != nil {
 			return err
 		}
 	}
@@ -177,9 +162,7 @@ func (c *Reconciler) updateRevisionLoggingURL(ctx context.Context, rev *v1.Revis
 		return
 	}
 
-	uid := string(rev.UID)
-
-	rev.Status.LogURL = strings.Replace(
+	rev.Status.LogURL = strings.ReplaceAll(
 		config.Observability.LoggingURLTemplate,
-		"${REVISION_UID}", uid, -1)
+		"${REVISION_UID}", string(rev.UID))
 }


Test patch:
diff --git a/test/config/100-namespace.yaml b/test/config/100-namespace.yaml
index 801f6bbd8..b1414b416 100644
--- a/test/config/100-namespace.yaml
+++ b/test/config/100-namespace.yaml
@@ -26,3 +26,8 @@ apiVersion: v1
 kind: Namespace
 metadata:
   name: serving-tests-security
+---
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: tls
diff --git a/test/e2e-auto-tls-tests.sh b/test/e2e-auto-tls-tests.sh
index 9e6f8b699..ee8043bc7 100755
--- a/test/e2e-auto-tls-tests.sh
+++ b/test/e2e-auto-tls-tests.sh
@@ -32,6 +32,8 @@ function setup_auto_tls_env_variables() {
 
   export CUSTOM_DOMAIN_SUFFIX="$(($RANDOM % 10000)).${E2E_PROJECT_ID}.${DOMAIN_NAME}"
 
+  export TLS_TEST_NAMESPACE="tls"
+
   local INGRESS_NAMESPACE=${GATEWAY_NAMESPACE_OVERRIDE}
   if [[ -z "${GATEWAY_NAMESPACE_OVERRIDE}" ]]; then
     INGRESS_NAMESPACE="istio-system"
@@ -75,18 +77,18 @@ function cleanup_auto_tls_common() {
   cleanup_custom_domain
 
   toggle_feature autoTLS Disabled config-network
-  kubectl delete kcert --all -n serving-tests
+  kubectl delete kcert --all -n "${TLS_TEST_NAMESPACE}"
 }
 
 function setup_http01_auto_tls() {
-    # The name of the test.
-  export AUTO_TLS_TEST_NAME="HTTP01"
-  # The name of the Knative Service deployed in Auto TLS E2E test.
-  export TLS_SERVICE_NAME="http01"
+    # The name of the test, lowercase to avoid hyphenation of the test name.
+  export AUTO_TLS_TEST_NAME="http01"
+  # Rely on the built-in naming (for logstream)
+  unset TLS_SERVICE_NAME
   # The full host name of the Knative Service. This is used to configure the DNS record.
-  export FULL_HOST_NAME="*.serving-tests.${CUSTOM_DOMAIN_SUFFIX}"
+  export FULL_HOST_NAME="*.${TLS_TEST_NAMESPACE}.${CUSTOM_DOMAIN_SUFFIX}"
 
-  kubectl delete kcert --all -n serving-tests
+  kubectl delete kcert --all -n "${TLS_TEST_NAMESPACE}"
 
   if [[ -z "${MESH}" ]]; then
     echo "Install cert-manager no-mesh ClusterIssuer"
@@ -105,7 +107,7 @@ function setup_selfsigned_per_ksvc_auto_tls() {
   # The name of the Knative Service deployed in Auto TLS E2E test.
   export TLS_SERVICE_NAME="self-per-ksvc"
 
-  kubectl delete kcert --all -n serving-tests
+  kubectl delete kcert --all -n "${TLS_TEST_NAMESPACE}"
   kubectl apply -f ${TMP_DIR}/test/config/autotls/certmanager/selfsigned/
 }
 
@@ -115,10 +117,10 @@ function setup_selfsigned_per_namespace_auto_tls() {
   # The name of the Knative Service deployed in Auto TLS E2E test.
   export TLS_SERVICE_NAME="self-per-namespace"
 
-  kubectl delete kcert --all -n serving-tests
+  kubectl delete kcert --all -n "${TLS_TEST_NAMESPACE}"
 
-  # Enable namespace certificate only for serving-tests namespaces
-  export NAMESPACE_WITH_CERT="serving-tests"
+  # Enable namespace certificate only for "${TLS_TEST_NAMESPACE}" namespaces
+  export NAMESPACE_WITH_CERT=""${TLS_TEST_NAMESPACE}""
   go run ./test/e2e/autotls/config/disablenscert
 
   kubectl apply -f ${TMP_DIR}/test/config/autotls/certmanager/selfsigned/
@@ -143,7 +145,7 @@ function cleanup_per_selfsigned_namespace_auto_tls() {
   echo "Uninstall namespace cert controller"
   kubectl delete -f ${SERVING_NSCERT_YAML} --ignore-not-found=true
 
-  kubectl delete kcert --all -n serving-tests
+  kubectl delete kcert --all -n "${TLS_TEST_NAMESPACE}"
   kubectl delete -f ${TMP_DIR}/test/config/autotls/certmanager/selfsigned/ --ignore-not-found=true
 }
 
diff --git a/test/e2e/autotls/auto_tls_test.go b/test/e2e/autotls/auto_tls_test.go
index 05ee6cedc..a3dbac427 100644
--- a/test/e2e/autotls/auto_tls_test.go
+++ b/test/e2e/autotls/auto_tls_test.go
@@ -48,7 +48,9 @@ type config struct {
 
 var env config
 
-func TestAutoTLS(t *testing.T) {
+// Technically TLS is proper Go casing for acronyms, but it makes our test naming
+// hyphenate between every character, and we hit length problems.
+func TestTls(t *testing.T) {
 	if err := envconfig.Process("", &env); err != nil {
 		t.Fatalf("Failed to process environment variable: %v.", err)
 	}
@@ -56,7 +58,7 @@ func TestAutoTLS(t *testing.T) {
 }
 
 func testAutoTLS(t *testing.T) {
-	clients := e2e.Setup(t)
+	clients := e2e.SetupWithNamespace(t, test.TLSNamespace)
 
 	names := test.ResourceNames{
 		Service: test.ObjectNameForTest(t),
@@ -93,11 +95,11 @@ func testAutoTLS(t *testing.T) {
 		}
 		if _, err := v1test.UpdateServiceRouteSpec(t, clients, names, servingv1.RouteSpec{
 			Traffic: []servingv1.TrafficTarget{{
-				Tag:            "tag1",
+				Tag:            "r",
 				Percent:        ptr.Int64(50),
 				LatestRevision: ptr.Bool(true),
 			}, {
-				Tag:            "tag2",
+				Tag:            "b",
 				Percent:        ptr.Int64(50),
 				LatestRevision: ptr.Bool(true),
 			}},
diff --git a/test/e2e/image_pull_error_test.go b/test/e2e/image_pull_error_test.go
index 2dfb87aed..5cf7d83ed 100644
--- a/test/e2e/image_pull_error_test.go
+++ b/test/e2e/image_pull_error_test.go
@@ -21,9 +21,8 @@ import (
 	"fmt"
 	"testing"
 
+	"k8s.io/apimachinery/pkg/util/sets"
 	v1 "knative.dev/serving/pkg/apis/serving/v1"
-	serviceresourcenames "knative.dev/serving/pkg/reconciler/service/resources/names"
-	rtesting "knative.dev/serving/pkg/testing/v1"
 	"knative.dev/serving/test"
 	v1test "knative.dev/serving/test/v1"
 )
@@ -33,41 +32,35 @@ func TestImagePullError(t *testing.T) {
 
 	clients := Setup(t)
 	names := test.ResourceNames{
-		Service: test.ObjectNameForTest(t),
+		Config: test.ObjectNameForTest(t),
 		// TODO: Replace this when sha256 is broken.
 		Image: "ubuntu@sha256:0000000000000000000000000000000000000000000000000000000000000000",
 	}
 
 	test.EnsureTearDown(t, clients, &names)
 
-	t.Logf("Creating a new Service %s", names.Image)
-	var (
-		svc *v1.Service
-		err error
-	)
-	if svc, err = createLatestService(t, clients, names); err != nil {
-		t.Fatalf("Failed to create Service %s: %v", names.Service, err)
+	t.Logf("Creating a new Configuration  %s:%s", names.Config, names.Image)
+	_, err := createLatestConfig(t, clients, names)
+	if err != nil {
+		t.Fatalf("Failed to create Config %s: %v", names.Config, err)
 	}
 
-	names.Config = serviceresourcenames.Configuration(svc)
-
-	err = v1test.WaitForServiceState(clients.ServingClient, names.Service, func(r *v1.Service) (bool, error) {
-		cond := r.Status.GetCondition(v1.ServiceConditionConfigurationsReady)
+	const wantCfgReason = "RevisionFailed"
+	if err := v1test.WaitForConfigurationState(clients.ServingClient, names.Config, func(r *v1.Configuration) (bool, error) {
+		cond := r.Status.GetCondition(v1.ConfigurationConditionReady)
 		if cond != nil && !cond.IsUnknown() {
 			if cond.IsFalse() {
-				if cond.Reason == "RevisionFailed" {
+				if cond.Reason == wantCfgReason {
 					return true, nil
 				}
 			}
-			t.Logf("Reason: %s ; Message: %s ; Status: %s", cond.Reason, cond.Message, cond.Status)
-			return true, fmt.Errorf("the service %s was not marked with expected error condition, but with (Reason=%q, Message=%q, Status=%q)",
-				names.Service, cond.Reason, cond.Message, cond.Status)
+			t.Logf("Reason: %q; Message: %q; Status: %q", cond.Reason, cond.Message, cond.Status)
+			return true, fmt.Errorf("the Config %s ReadyCondition = (Reason=%q, Message=%q, Status=%q), wantReason: %q",
+				names.Config, cond.Reason, cond.Message, cond.Status, wantCfgReason)
 		}
 		return false, nil
-	}, "ContainerUnpullable")
-
-	if err != nil {
-		t.Fatal("Failed to validate service state:", err)
+	}, "ContainerUnpullable"); err != nil {
+		t.Fatal("Failed to validate configuration state:", err)
 	}
 
 	revisionName, err := revisionFromConfiguration(clients, names.Config)
@@ -76,28 +69,24 @@ func TestImagePullError(t *testing.T) {
 	}
 
 	t.Log("When the images are not pulled, the revision should have error status.")
-	err = v1test.CheckRevisionState(clients.ServingClient, revisionName, func(r *v1.Revision) (bool, error) {
+	wantRevReasons := sets.NewString("ImagePullBackOff", "ErrImagePull")
+	if err := v1test.CheckRevisionState(clients.ServingClient, revisionName, func(r *v1.Revision) (bool, error) {
 		cond := r.Status.GetCondition(v1.RevisionConditionReady)
 		if cond != nil {
-			if cond.Reason == "ImagePullBackOff" || cond.Reason == "ErrImagePull" {
+			if wantRevReasons.Has(cond.Reason) {
 				return true, nil
 			}
-			return true, fmt.Errorf("the revision %s was not marked with expected error condition, but with (Reason=%q, Message=%q)",
-				revisionName, cond.Reason, cond.Message)
+			return true, fmt.Errorf("the Revision %s ReadyCondition = (Reason=%q, Message=%q), wantReasons: %v",
+				revisionName, cond.Reason, cond.Message, wantRevReasons.UnsortedList())
 		}
 		return false, nil
-	})
-
-	if err != nil {
+	}); err != nil {
 		t.Fatal("Failed to validate revision state:", err)
 	}
 }
 
-// Wrote our own thing so that we can pass in an image by digest.
-// knative/pkg/test.ImagePath currently assumes there's a tag, which fails to parse.
-func createLatestService(t *testing.T, clients *test.Clients, names test.ResourceNames) (*v1.Service, error) {
-	opt := rtesting.WithConfigSpec(v1test.ConfigurationSpec(names.Image))
-	service := rtesting.ServiceWithoutNamespace(names.Service, opt)
-	v1test.LogResourceObject(t, v1test.ResourceObjects{Service: service})
-	return clients.ServingClient.Services.Create(service)
+func createLatestConfig(t *testing.T, clients *test.Clients, names test.ResourceNames) (*v1.Configuration, error) {
+	return v1test.CreateConfiguration(t, clients, names, func(c *v1.Configuration) {
+		c.Spec = *v1test.ConfigurationSpec(names.Image)
+	})
 }
diff --git a/test/e2e_constants.go b/test/e2e_constants.go
index 660de776e..4766ce9fd 100644
--- a/test/e2e_constants.go
+++ b/test/e2e_constants.go
@@ -31,6 +31,9 @@ const (
 	// ServingNamespaceforSecurityTesting is the namespace for security tests.
 	ServingNamespaceforSecurityTesting = "serving-tests-security"
 
+	// TLSNamespace is the namespace for serving tls tests
+	TLSNamespace = "tls"
+
 	// Environment propagation conformance test objects
 
 	// ConformanceConfigMap is the name of the configmap to propagate env variables from