Skip to content

Commit

Permalink
fix some deprecated methods (#9768)
Browse files Browse the repository at this point in the history
  • Loading branch information
Murphylu1993 authored Oct 13, 2020
1 parent dbf5148 commit d8a317c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/activator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func main() {
// Report stats on Go memory usage every 30 seconds.
metrics.MemStatsOrDie(ctx)

cfg := sharedmain.ParseAndGetConfigOrDie()
cfg := injection.ParseAndGetRESTConfigOrDie()

log.Printf("Registering %d clients", len(injection.Default.GetClients()))
log.Printf("Registering %d informer factories", len(injection.Default.GetInformerFactories()))
Expand Down
2 changes: 1 addition & 1 deletion cmd/autoscaler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func main() {
// Report stats on Go memory usage every 30 seconds.
metrics.MemStatsOrDie(ctx)

cfg := sharedmain.ParseAndGetConfigOrDie()
cfg := injection.ParseAndGetRESTConfigOrDie()

log.Printf("Registering %d clients", len(injection.Default.GetClients()))
log.Printf("Registering %d informer factories", len(injection.Default.GetInformerFactories()))
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/autotls/config/disablenscert/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import (
"log"

"github.com/kelseyhightower/envconfig"
"knative.dev/pkg/injection"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/sets"

"knative.dev/networking/pkg/apis/networking"
"knative.dev/pkg/injection/sharedmain"
test "knative.dev/serving/test"
)

Expand All @@ -41,7 +41,7 @@ func main() {
log.Fatal("Failed to process environment variable: ", err)
}

cfg, err := sharedmain.GetConfig("", "")
cfg, err := injection.GetRESTConfig("", "")
if err != nil {
log.Fatal("Failed to build config: ", err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"time"

v1 "k8s.io/api/apps/v1"
"knative.dev/pkg/injection"

"github.com/google/mako/go/quickstore"
"k8s.io/apimachinery/pkg/labels"
Expand All @@ -38,7 +39,6 @@ import (

"golang.org/x/sync/errgroup"

"knative.dev/pkg/injection/sharedmain"
pkgTest "knative.dev/pkg/test"
"knative.dev/serving/pkg/apis/autoscaling"
ktest "knative.dev/serving/pkg/testing/v1"
Expand All @@ -63,7 +63,7 @@ const (
)

func clientsFromConfig() (*test.Clients, error) {
cfg, err := sharedmain.GetConfig("", "")
cfg, err := injection.GetRESTConfig("", "")
if err != nil {
return nil, fmt.Errorf("error building kubeconfig: %v", err)
}
Expand Down

0 comments on commit d8a317c

Please sign in to comment.