Enforce ReadWriteOncePod access mode during scheduling
Check the PVC ref count on the node info cache to determine if a pod's PVCs are in use. If they are and it is using ReadWriteOncePod, fail the request.
This commit is contained in:
@@ -53,6 +53,7 @@ func NewInTreeRegistry() runtime.Registry {
|
||||
EnablePodAffinityNamespaceSelector: feature.DefaultFeatureGate.Enabled(features.PodAffinityNamespaceSelector),
|
||||
EnablePodDisruptionBudget: feature.DefaultFeatureGate.Enabled(features.PodDisruptionBudget),
|
||||
EnablePodOverhead: feature.DefaultFeatureGate.Enabled(features.PodOverhead),
|
||||
EnableReadWriteOncePod: feature.DefaultFeatureGate.Enabled(features.ReadWriteOncePod),
|
||||
}
|
||||
|
||||
return runtime.Registry{
|
||||
@@ -80,8 +81,10 @@ func NewInTreeRegistry() runtime.Registry {
|
||||
noderesources.RequestedToCapacityRatioName: func(plArgs apiruntime.Object, fh framework.Handle) (framework.Plugin, error) {
|
||||
return noderesources.NewRequestedToCapacityRatio(plArgs, fh, fts)
|
||||
},
|
||||
volumebinding.Name: volumebinding.New,
|
||||
volumerestrictions.Name: volumerestrictions.New,
|
||||
volumebinding.Name: volumebinding.New,
|
||||
volumerestrictions.Name: func(plArgs apiruntime.Object, fh framework.Handle) (framework.Plugin, error) {
|
||||
return volumerestrictions.New(plArgs, fh, fts)
|
||||
},
|
||||
volumezone.Name: volumezone.New,
|
||||
nodevolumelimits.CSIName: nodevolumelimits.NewCSI,
|
||||
nodevolumelimits.EBSName: nodevolumelimits.NewEBS,
|
||||
|
Reference in New Issue
Block a user