File tree 1 file changed +5
-2
lines changed
pkg/quota/admission/clusterresourceoverride 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,10 @@ func (d *limitRangerActions) SupportsAttributes(a admission.Attributes) bool {
107
107
func (d * limitRangerActions ) SupportsLimit (limitRange * kapi.LimitRange ) bool {
108
108
return true
109
109
}
110
- func (d * limitRangerActions ) Limit (limitRange * kapi.LimitRange , resourceName string , obj runtime.Object ) error {
110
+ func (d * limitRangerActions ) MutateLimit (limitRange * kapi.LimitRange , resourceName string , obj runtime.Object ) error {
111
+ return nil
112
+ }
113
+ func (d * limitRangerActions ) ValidateLimit (limitRange * kapi.LimitRange , resourceName string , obj runtime.Object ) error {
111
114
return nil
112
115
}
113
116
@@ -194,7 +197,7 @@ func (a *clusterResourceOverridePlugin) Admit(attr admission.Attributes) error {
194
197
// Reuse LimitRanger logic to apply limit/req defaults from the project. Ignore validation
195
198
// errors, assume that LimitRanger will run after this plugin to validate.
196
199
glog .V (5 ).Infof ("%s: initial pod limits are: %#v" , api .PluginName , pod .Spec )
197
- if err := a .LimitRanger .Admit (attr ); err != nil {
200
+ if err := a .LimitRanger .(admission. MutationInterface ). Admit (attr ); err != nil {
198
201
glog .V (5 ).Infof ("%s: error from LimitRanger: %#v" , api .PluginName , err )
199
202
}
200
203
glog .V (5 ).Infof ("%s: pod limits after LimitRanger: %#v" , api .PluginName , pod .Spec )
You can’t perform that action at this time.
0 commit comments