mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	Remove references to already deleted volume plugins
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
		| @@ -1,14 +0,0 @@ | |||||||
| # See the OWNERS docs at https://go.k8s.io/owners |  | ||||||
|  |  | ||||||
| approvers: |  | ||||||
|   - saad-ali |  | ||||||
|   - jingxu97 |  | ||||||
|   - humblec |  | ||||||
| reviewers: |  | ||||||
|   - saad-ali |  | ||||||
|   - jsafrane |  | ||||||
|   - humblec |  | ||||||
|   - jingxu97 |  | ||||||
|   - msau42 |  | ||||||
| emeritus_approvers: |  | ||||||
|   - rootfs |  | ||||||
| @@ -1,19 +0,0 @@ | |||||||
| /* |  | ||||||
| Copyright 2015 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 glusterfs contains the internal representation of glusterfs |  | ||||||
| // volumes. |  | ||||||
| package glusterfs // import "k8s.io/kubernetes/pkg/volume/glusterfs" |  | ||||||
| @@ -64,16 +64,6 @@ const ( | |||||||
| 	ProbeRemove | 	ProbeRemove | ||||||
| ) | ) | ||||||
|  |  | ||||||
| var ( |  | ||||||
| 	deprecatedVolumeProviders = map[string]string{ |  | ||||||
| 		"kubernetes.io/cinder":    "The Cinder volume provider is deprecated and will be removed in a future release", |  | ||||||
| 		"kubernetes.io/storageos": "The StorageOS volume provider is deprecated and will be removed in a future release", |  | ||||||
| 		"kubernetes.io/quobyte":   "The Quobyte volume provider is deprecated and will be removed in a future release", |  | ||||||
| 		"kubernetes.io/flocker":   "The Flocker volume provider is deprecated and will be removed in a future release", |  | ||||||
| 		"kubernetes.io/glusterfs": "The GlusterFS volume provider is deprecated and will be removed soon after in a subsequent release", |  | ||||||
| 	} |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| // VolumeOptions contains option information about a volume. | // VolumeOptions contains option information about a volume. | ||||||
| type VolumeOptions struct { | type VolumeOptions struct { | ||||||
| 	// The attributes below are required by volume.Provisioner | 	// The attributes below are required by volume.Provisioner | ||||||
| @@ -698,8 +688,6 @@ func (pm *VolumePluginMgr) FindPluginBySpec(spec *Spec) (VolumePlugin, error) { | |||||||
| 		return nil, fmt.Errorf("multiple volume plugins matched: %s", strings.Join(matchedPluginNames, ",")) | 		return nil, fmt.Errorf("multiple volume plugins matched: %s", strings.Join(matchedPluginNames, ",")) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// Issue warning if the matched provider is deprecated |  | ||||||
| 	pm.logDeprecation(match.GetPluginName()) |  | ||||||
| 	return match, nil | 	return match, nil | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -726,22 +714,9 @@ func (pm *VolumePluginMgr) FindPluginByName(name string) (VolumePlugin, error) { | |||||||
| 	if match == nil { | 	if match == nil { | ||||||
| 		return nil, fmt.Errorf("no volume plugin matched name: %s", name) | 		return nil, fmt.Errorf("no volume plugin matched name: %s", name) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// Issue warning if the matched provider is deprecated |  | ||||||
| 	pm.logDeprecation(match.GetPluginName()) |  | ||||||
| 	return match, nil | 	return match, nil | ||||||
| } | } | ||||||
|  |  | ||||||
| // logDeprecation logs warning when a deprecated plugin is used. |  | ||||||
| func (pm *VolumePluginMgr) logDeprecation(plugin string) { |  | ||||||
| 	if detail, ok := deprecatedVolumeProviders[plugin]; ok && !pm.loggedDeprecationWarnings.Has(plugin) { |  | ||||||
| 		klog.Warningf("WARNING: %s built-in volume provider is now deprecated. %s", plugin, detail) |  | ||||||
| 		// Make sure the message is logged only once. It has Warning severity |  | ||||||
| 		// and we don't want to spam the log too much. |  | ||||||
| 		pm.loggedDeprecationWarnings.Insert(plugin) |  | ||||||
| 	} |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // Check if probedPlugin cache update is required. | // Check if probedPlugin cache update is required. | ||||||
| // If it is, initialize all probed plugins and replace the cache with them. | // If it is, initialize all probed plugins and replace the cache with them. | ||||||
| func (pm *VolumePluginMgr) refreshProbedPlugins() { | func (pm *VolumePluginMgr) refreshProbedPlugins() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Davanum Srinivas
					Davanum Srinivas