Skip to content

Commit

Permalink
Remove PersistentVolumeLabel admission plugin
Browse files Browse the repository at this point in the history
Remove useless admission plugin.

* It has been deprecated for years.
* All in-tree cloud providers were removed, so the admission plugin does not have
  any way to get PV labels.
* There is a replacement in https://github.com/kubernetes-sigs/cloud-pv-admission-labeler
  • Loading branch information
jsafrane committed May 9, 2024
1 parent a7721e4 commit e7a6ed2
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 1,008 deletions.
2 changes: 1 addition & 1 deletion hack/make-rules/test-cmd.sh
Expand Up @@ -56,7 +56,7 @@ function run_kube_apiserver() {

# Admission Controllers to invoke prior to persisting objects in cluster
ENABLE_ADMISSION_PLUGINS="LimitRanger,ResourceQuota"
DISABLE_ADMISSION_PLUGINS="ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,StorageObjectInUseProtection"
DISABLE_ADMISSION_PLUGINS="ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,StorageObjectInUseProtection"

# Include RBAC (to exercise bootstrapping), and AlwaysAllow to allow all actions
AUTHORIZATION_MODE="RBAC,AlwaysAllow"
Expand Down
3 changes: 0 additions & 3 deletions pkg/kubeapiserver/options/plugins.go
Expand Up @@ -49,7 +49,6 @@ import (
"k8s.io/kubernetes/plugin/pkg/admission/runtimeclass"
"k8s.io/kubernetes/plugin/pkg/admission/security/podsecurity"
"k8s.io/kubernetes/plugin/pkg/admission/serviceaccount"
"k8s.io/kubernetes/plugin/pkg/admission/storage/persistentvolume/label"
"k8s.io/kubernetes/plugin/pkg/admission/storage/persistentvolume/resize"
"k8s.io/kubernetes/plugin/pkg/admission/storage/storageclass/setdefault"
"k8s.io/kubernetes/plugin/pkg/admission/storage/storageobjectinuseprotection"
Expand Down Expand Up @@ -82,7 +81,6 @@ var AllOrderedPlugins = []string{
podtolerationrestriction.PluginName, // PodTolerationRestriction
eventratelimit.PluginName, // EventRateLimit
extendedresourcetoleration.PluginName, // ExtendedResourceToleration
label.PluginName, // PersistentVolumeLabel
setdefault.PluginName, // DefaultStorageClass
storageobjectinuseprotection.PluginName, // StorageObjectInUseProtection
gc.PluginName, // OwnerReferencesPermissionEnforcement
Expand Down Expand Up @@ -126,7 +124,6 @@ func RegisterAllAdmissionPlugins(plugins *admission.Plugins) {
exists.Register(plugins)
noderestriction.Register(plugins)
nodetaint.Register(plugins)
label.Register(plugins) // DEPRECATED, future PVs should not rely on labels for zone topology
podnodeselector.Register(plugins)
podtolerationrestriction.Register(plugins)
runtimeclass.Register(plugins)
Expand Down
10 changes: 0 additions & 10 deletions plugin/pkg/admission/storage/persistentvolume/label/OWNERS

This file was deleted.

309 changes: 0 additions & 309 deletions plugin/pkg/admission/storage/persistentvolume/label/admission.go

This file was deleted.

0 comments on commit e7a6ed2

Please sign in to comment.