|
8 | 8 | "github.com/golang/glog"
|
9 | 9 |
|
10 | 10 | "k8s.io/apimachinery/pkg/api/resource"
|
11 |
| - "k8s.io/apimachinery/pkg/runtime" |
12 | 11 | "k8s.io/apiserver/pkg/admission"
|
13 | 12 | kapi "k8s.io/kubernetes/pkg/apis/core"
|
14 | 13 | kclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
|
@@ -60,10 +59,8 @@ type clusterResourceOverridePlugin struct {
|
60 | 59 | ProjectCache *cache.ProjectCache
|
61 | 60 | LimitRanger admission.Interface
|
62 | 61 | }
|
63 |
| -type limitRangerActions struct{} |
64 | 62 |
|
65 | 63 | var _ = oadmission.WantsProjectCache(&clusterResourceOverridePlugin{})
|
66 |
| -var _ = limitranger.LimitRangerActions(&limitRangerActions{}) |
67 | 64 | var _ = kadmission.WantsInternalKubeInformerFactory(&clusterResourceOverridePlugin{})
|
68 | 65 | var _ = kadmission.WantsInternalKubeClientSet(&clusterResourceOverridePlugin{})
|
69 | 66 |
|
@@ -100,20 +97,6 @@ func (d *clusterResourceOverridePlugin) SetInternalKubeClientSet(c kclientset.In
|
100 | 97 | d.LimitRanger.(kadmission.WantsInternalKubeClientSet).SetInternalKubeClientSet(c)
|
101 | 98 | }
|
102 | 99 |
|
103 |
| -// these serve to satisfy the interface so that our kept LimitRanger limits nothing and only provides defaults. |
104 |
| -func (d *limitRangerActions) SupportsAttributes(a admission.Attributes) bool { |
105 |
| - return true |
106 |
| -} |
107 |
| -func (d *limitRangerActions) SupportsLimit(limitRange *kapi.LimitRange) bool { |
108 |
| - return true |
109 |
| -} |
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 { |
114 |
| - return nil |
115 |
| -} |
116 |
| - |
117 | 100 | func (a *clusterResourceOverridePlugin) SetProjectCache(projectCache *cache.ProjectCache) {
|
118 | 101 | a.ProjectCache = projectCache
|
119 | 102 | }
|
|
0 commit comments