mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	hack/verify-staging-imports.sh: check that plugins are not imported by default
This commit is contained in:
		| @@ -77,4 +77,12 @@ if grep -rq '// import "k8s.io/kubernetes/' 'staging/'; then | ||||
| 	exit 1 | ||||
| fi | ||||
|  | ||||
| for EXAMPLE in vendor/k8s.io/client-go/examples/{in-cluster,out-of-cluster,third-party-resources}; do | ||||
| 	test -d "${EXAMPLE}" # make sure example is still there | ||||
| 	if go list -f '{{ join .Deps "\n" }}' "./${EXAMPLE}/..." | sort | uniq | grep -q k8s.io/client-go/plugin; then | ||||
| 		echo "${EXAMPLE} imports client-go plugins by default, but shouldn't." | ||||
| 		exit 1 | ||||
| 	fi | ||||
| done | ||||
|  | ||||
| exit 0 | ||||
| @@ -25,6 +25,8 @@ import ( | ||||
| 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||
| 	"k8s.io/client-go/kubernetes" | ||||
| 	"k8s.io/client-go/tools/clientcmd" | ||||
| 	// Uncomment the following line to load the gcp plugin (only required to authenticate against GKE clusters). | ||||
| 	// _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" | ||||
| ) | ||||
|  | ||||
| func main() { | ||||
|   | ||||
| @@ -31,9 +31,8 @@ import ( | ||||
| 	"k8s.io/client-go/pkg/apis/extensions/v1beta1" | ||||
| 	"k8s.io/client-go/rest" | ||||
| 	"k8s.io/client-go/tools/clientcmd" | ||||
|  | ||||
| 	// Only required to authenticate against GKE clusters | ||||
| 	_ "k8s.io/client-go/plugin/pkg/client/auth/gcp" | ||||
| 	// Uncomment the following line to load the gcp plugin (only required to authenticate against GKE clusters). | ||||
| 	// _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" | ||||
| ) | ||||
|  | ||||
| func main() { | ||||
|   | ||||
							
								
								
									
										1
									
								
								vendor/BUILD
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/BUILD
									
									
									
									
										vendored
									
									
								
							| @@ -11766,7 +11766,6 @@ go_library( | ||||
|         "//vendor:k8s.io/client-go/kubernetes", | ||||
|         "//vendor:k8s.io/client-go/pkg/api", | ||||
|         "//vendor:k8s.io/client-go/pkg/apis/extensions/v1beta1", | ||||
|         "//vendor:k8s.io/client-go/plugin/pkg/client/auth/gcp", | ||||
|         "//vendor:k8s.io/client-go/rest", | ||||
|         "//vendor:k8s.io/client-go/tools/clientcmd", | ||||
|     ], | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dr. Stefan Schimanski
					Dr. Stefan Schimanski