From bceea66d278211e4a1dd3ccb40a774bd672cc59e Mon Sep 17 00:00:00 2001
From: Adam Reese <adam@reese.io>
Date: Thu, 8 Dec 2016 09:05:23 -0800
Subject: [PATCH] ref(kube): remove unused fields on client

---
 pkg/kube/client.go      | 14 +++-----------
 pkg/kube/client_test.go |  2 --
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/pkg/kube/client.go b/pkg/kube/client.go
index 1cdf6a2da..9cec157db 100644
--- a/pkg/kube/client.go
+++ b/pkg/kube/client.go
@@ -46,13 +46,6 @@ var ErrNoObjectsVisited = goerrors.New("no objects visited")
 // Client represents a client capable of communicating with the Kubernetes API.
 type Client struct {
 	cmdutil.Factory
-	// IncludeThirdPartyAPIs indicates whether to load "dynamic" APIs.
-	//
-	// This requires additional calls to the Kubernetes API server, and these calls
-	// are not supported by all versions. Additionally, during testing, initializing
-	// a client will still attempt to contact a live server. In these situations,
-	// this flag may need to be disabled.
-	IncludeThirdPartyAPIs bool
 	// Validate idicates whether to load a schema for validation.
 	Validate bool
 	// SchemaCacheDir is the path for loading cached schema.
@@ -62,10 +55,9 @@ type Client struct {
 // New create a new Client
 func New(config clientcmd.ClientConfig) *Client {
 	return &Client{
-		Factory:               cmdutil.NewFactory(config),
-		IncludeThirdPartyAPIs: true,
-		Validate:              true,
-		SchemaCacheDir:        clientcmd.RecommendedSchemaFile,
+		Factory:        cmdutil.NewFactory(config),
+		Validate:       true,
+		SchemaCacheDir: clientcmd.RecommendedSchemaFile,
 	}
 }
 
diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go
index 71a43636e..df281f5f4 100644
--- a/pkg/kube/client_test.go
+++ b/pkg/kube/client_test.go
@@ -142,14 +142,12 @@ func TestPerform(t *testing.T) {
 func TestReal(t *testing.T) {
 	t.Skip("This is a live test, comment this line to run")
 	c := New(nil)
-	c.IncludeThirdPartyAPIs = false
 	if err := c.Create("test", strings.NewReader(guestbookManifest)); err != nil {
 		t.Fatal(err)
 	}
 
 	testSvcEndpointManifest := testServiceManifest + "\n---\n" + testEndpointManifest
 	c = New(nil)
-	c.IncludeThirdPartyAPIs = false
 	if err := c.Create("test-delete", strings.NewReader(testSvcEndpointManifest)); err != nil {
 		t.Fatal(err)
 	}
-- 
GitLab