@@ -23,6 +23,7 @@ import (
2323 "os"
2424 "os/signal"
2525 "strconv"
26+ "strings"
2627 "time"
2728
2829 "github.com/cortexlabs/cortex/pkg/activator"
@@ -32,7 +33,6 @@ import (
3233 "github.com/cortexlabs/cortex/pkg/lib/k8s"
3334 "github.com/cortexlabs/cortex/pkg/lib/logging"
3435 "github.com/cortexlabs/cortex/pkg/lib/telemetry"
35- "github.com/cortexlabs/cortex/pkg/types/clusterconfig"
3636 "github.com/cortexlabs/cortex/pkg/types/userconfig"
3737 "go.uber.org/zap"
3838 istioinformers "istio.io/client-go/pkg/informers/externalversions"
@@ -43,12 +43,11 @@ import (
4343
4444func main () {
4545 var (
46- port int
47- adminPort int
48- inCluster bool
49- autoscalerURL string
50- namespace string
51- clusterConfigPath string
46+ port int
47+ adminPort int
48+ inCluster bool
49+ autoscalerURL string
50+ namespace string
5251 )
5352
5453 flag .IntVar (& port , "port" , 8000 , "port where the activator server will be exposed" )
@@ -59,7 +58,6 @@ func main() {
5958 "kubernetes namespace where the cortex APIs are deployed " +
6059 "(can be set through the CORTEX_NAMESPACE env variable)" ,
6160 )
62- flag .StringVar (& clusterConfigPath , "cluster-config" , "" , "cluster config path" )
6361 flag .Parse ()
6462
6563 log := logging .GetLogger ()
@@ -72,16 +70,9 @@ func main() {
7270 log .Fatal ("--autoscaler-url is a required option" )
7371 case namespace == "" :
7472 log .Fatal ("--namespace is a required option" )
75- case clusterConfigPath == "" :
76- log .Fatal ("--cluster-config flag is required" )
7773 }
7874
79- clusterConfig , err := clusterconfig .NewForFile (clusterConfigPath )
80- if err != nil {
81- exit (log , err )
82- }
83-
84- awsClient , err := aws .NewForRegion (clusterConfig .Region )
75+ awsClient , err := aws .New ()
8576 if err != nil {
8677 exit (log , err )
8778 }
@@ -91,8 +82,10 @@ func main() {
9182 exit (log , err )
9283 }
9384
85+ telemetryEnabled := strings .ToLower (os .Getenv ("CORTEX_TELEMETRY_DISABLE" )) != "true"
86+
9487 err = telemetry .Init (telemetry.Config {
95- Enabled : clusterConfig . Telemetry ,
88+ Enabled : telemetryEnabled ,
9689 UserID : userID ,
9790 Properties : map [string ]string {
9891 "kind" : userconfig .RealtimeAPIKind .String (),
0 commit comments