Add backendConfigClient to e2e framework
@@ -34,6 +34,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
+ backendconfigclient "k8s.io/ingress-gce/pkg/backendconfig/client/clientset/versioned"
"k8s.io/kubernetes/pkg/cloudprovider/providers/gce/cloud"
)
@@ -50,9 +51,14 @@ func NewFramework(config *rest.Config, options Options) *Framework {
if err != nil {
panic(err)
}
+ backendConfigClient, err := backendconfigclient.NewForConfig(config)
+ if err != nil {
+ glog.Fatalf("Failed to create BackendConfig client: %v", err)
+ }
return &Framework{
RestConfig: config,
Clientset: kubernetes.NewForConfigOrDie(config),
+ BackendConfigClient: backendConfigClient,
Project: options.Project,
Cloud: theCloud,
Rand: rand.New(rand.NewSource(options.Seed)),
@@ -64,6 +70,7 @@ func NewFramework(config *rest.Config, options Options) *Framework {
type Framework struct {
RestConfig *rest.Config
Clientset *kubernetes.Clientset
+ BackendConfigClient *backendconfigclient.Clientset
Project string
Cloud cloud.Cloud
Rand *rand.Rand
