Skip to content

Commit

Permalink
queue get env from system.Namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
xu zhao committed Jan 18, 2019
1 parent c33b9fa commit 9d46532
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/queue/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions pkg/reconciler/v1alpha1/revision/resources/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions pkg/reconciler/v1alpha1/revision/resources/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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(),
}},
}
}

0 comments on commit 9d46532

Please sign in to comment.