Skip to content

Commit de77da5

Browse files
committed
stop special casing creation for ns lifecycle admission
1 parent aed9bab commit de77da5

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

pkg/cmd/server/origin/admission/chain_builder.go

-21
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"os"
99
"reflect"
1010

11-
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1211
"k8s.io/apimachinery/pkg/util/sets"
1312
"k8s.io/apiserver/pkg/admission"
1413
admissionmetrics "k8s.io/apiserver/pkg/admission/metrics"
@@ -196,26 +195,6 @@ func newAdmissionChain(pluginNames []string, admissionConfigFilename string, opt
196195
)
197196

198197
switch pluginName {
199-
case lifecycle.PluginName:
200-
// We need to include our infrastructure and shared resource namespaces in the immortal namespaces list
201-
immortalNamespaces := sets.NewString(metav1.NamespaceDefault)
202-
if len(options.PolicyConfig.OpenShiftSharedResourcesNamespace) > 0 {
203-
immortalNamespaces.Insert(options.PolicyConfig.OpenShiftSharedResourcesNamespace)
204-
}
205-
if len(options.PolicyConfig.OpenShiftInfrastructureNamespace) > 0 {
206-
immortalNamespaces.Insert(options.PolicyConfig.OpenShiftInfrastructureNamespace)
207-
}
208-
lc, err := lifecycle.NewLifecycle(immortalNamespaces)
209-
if err != nil {
210-
return nil, err
211-
}
212-
admissionInitializer.Initialize(lc)
213-
if err := lc.ValidateInitialization(); err != nil {
214-
return nil, err
215-
}
216-
plugin = lc
217-
admissionInitializer.Initialize(plugin)
218-
219198
case serviceadmit.ExternalIPPluginName:
220199
// this needs to be moved upstream to be part of core config
221200
reject, admit, err := serviceadmit.ParseRejectAdmitCIDRRules(options.NetworkConfig.ExternalIPNetworkCIDRs)

0 commit comments

Comments
 (0)