diff --git a/cmd/queue/main.go b/cmd/queue/main.go index 1aa309dc11e5..2a1f45a4801a 100644 --- a/cmd/queue/main.go +++ b/cmd/queue/main.go @@ -94,7 +94,7 @@ func initEnv() { servingNamespace = util.GetRequiredEnvOrFatal("SERVING_NAMESPACE", logger) servingRevision = util.GetRequiredEnvOrFatal("SERVING_REVISION", logger) servingAutoscaler = util.GetRequiredEnvOrFatal("SERVING_AUTOSCALER", logger) - autoscalerNamespace = util.GetRequiredEnvOrFatal("AUTOSCALER_NAMESPACE", logger) + autoscalerNamespace = util.GetRequiredEnvOrFatal("SYSTEM_NAMESPACE", logger) servingAutoscalerPort = util.MustParseIntEnvOrFatal("SERVING_AUTOSCALER_PORT", logger) containerConcurrency = util.MustParseIntEnvOrFatal("CONTAINER_CONCURRENCY", logger) revisionTimeoutSeconds = util.MustParseIntEnvOrFatal("REVISION_TIMEOUT_SECONDS", logger) diff --git a/pkg/reconciler/v1alpha1/revision/resources/deploy_test.go b/pkg/reconciler/v1alpha1/revision/resources/deploy_test.go index 85546245a850..246b7d51df16 100644 --- a/pkg/reconciler/v1alpha1/revision/resources/deploy_test.go +++ b/pkg/reconciler/v1alpha1/revision/resources/deploy_test.go @@ -27,6 +27,7 @@ import ( "github.com/knative/serving/pkg/apis/serving/v1alpha1" "github.com/knative/serving/pkg/autoscaler" "github.com/knative/serving/pkg/reconciler/v1alpha1/revision/config" + _ "github.com/knative/serving/pkg/system/testing" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" diff --git a/pkg/reconciler/v1alpha1/revision/resources/queue.go b/pkg/reconciler/v1alpha1/revision/resources/queue.go index 53f2ba513391..c38236d7ace1 100644 --- a/pkg/reconciler/v1alpha1/revision/resources/queue.go +++ b/pkg/reconciler/v1alpha1/revision/resources/queue.go @@ -24,6 +24,7 @@ import ( "github.com/knative/serving/pkg/autoscaler" "github.com/knative/serving/pkg/queue" "github.com/knative/serving/pkg/reconciler/v1alpha1/revision/config" + "github.com/knative/serving/pkg/system" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" @@ -136,8 +137,8 @@ func makeQueueContainer(rev *v1alpha1.Revision, loggingConfig *logging.Config, a Name: "USER_PORT", Value: strconv.Itoa(int(userPort)), }, { - Name: "AUTOSCALER_NAMESPACE", - Value: "knative-serving", + Name: system.NamespaceEnvKey, + Value: system.Namespace(), }}, } }