mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	Ensure providerless kubelet does not pull cloud providers
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
		| @@ -18,11 +18,6 @@ package app | ||||
|  | ||||
| // This file exists to force the desired plugin implementations to be linked. | ||||
| import ( | ||||
| 	// Credential providers | ||||
| 	_ "k8s.io/kubernetes/pkg/credentialprovider/aws" | ||||
| 	_ "k8s.io/kubernetes/pkg/credentialprovider/azure" | ||||
| 	_ "k8s.io/kubernetes/pkg/credentialprovider/gcp" | ||||
|  | ||||
| 	"k8s.io/component-base/featuregate" | ||||
| 	"k8s.io/utils/exec" | ||||
|  | ||||
|   | ||||
| @@ -19,6 +19,11 @@ limitations under the License. | ||||
| package app | ||||
|  | ||||
| import ( | ||||
| 	// Credential providers | ||||
| 	_ "k8s.io/kubernetes/pkg/credentialprovider/aws" | ||||
| 	_ "k8s.io/kubernetes/pkg/credentialprovider/azure" | ||||
| 	_ "k8s.io/kubernetes/pkg/credentialprovider/gcp" | ||||
|  | ||||
| 	"k8s.io/component-base/featuregate" | ||||
| 	"k8s.io/csi-translation-lib/plugins" | ||||
| 	"k8s.io/klog/v2" | ||||
|   | ||||
							
								
								
									
										28
									
								
								pkg/kubelet/cadvisor/cadvisor_cloudproviders.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								pkg/kubelet/cadvisor/cadvisor_cloudproviders.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| // +build linux | ||||
| // +build !providerless | ||||
|  | ||||
| /* | ||||
| Copyright 2021 The Kubernetes Authors. | ||||
|  | ||||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| you may not use this file except in compliance with the License. | ||||
| You may obtain a copy of the License at | ||||
|  | ||||
|     http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  | ||||
| Unless required by applicable law or agreed to in writing, software | ||||
| distributed under the License is distributed on an "AS IS" BASIS, | ||||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| See the License for the specific language governing permissions and | ||||
| limitations under the License. | ||||
| */ | ||||
|  | ||||
| package cadvisor | ||||
|  | ||||
| import ( | ||||
| 	// Register cloud info providers. | ||||
| 	// TODO(#68522): Remove this in 1.20+ once the cAdvisor endpoints are removed. | ||||
| 	_ "github.com/google/cadvisor/utils/cloudinfo/aws" | ||||
| 	_ "github.com/google/cadvisor/utils/cloudinfo/azure" | ||||
| 	_ "github.com/google/cadvisor/utils/cloudinfo/gce" | ||||
| ) | ||||
| @@ -31,12 +31,6 @@ import ( | ||||
| 	_ "github.com/google/cadvisor/container/crio/install" | ||||
| 	_ "github.com/google/cadvisor/container/systemd/install" | ||||
|  | ||||
| 	// Register cloud info providers. | ||||
| 	// TODO(#68522): Remove this in 1.20+ once the cAdvisor endpoints are removed. | ||||
| 	_ "github.com/google/cadvisor/utils/cloudinfo/aws" | ||||
| 	_ "github.com/google/cadvisor/utils/cloudinfo/azure" | ||||
| 	_ "github.com/google/cadvisor/utils/cloudinfo/gce" | ||||
|  | ||||
| 	"github.com/google/cadvisor/cache/memory" | ||||
| 	cadvisormetrics "github.com/google/cadvisor/container" | ||||
| 	"github.com/google/cadvisor/events" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Davanum Srinivas
					Davanum Srinivas