@@ -13,7 +13,6 @@ import (
13
13
"k8s.io/apimachinery/pkg/runtime"
14
14
"k8s.io/apimachinery/pkg/runtime/schema"
15
15
"k8s.io/apimachinery/pkg/util/sets"
16
- "k8s.io/apimachinery/pkg/util/yaml"
17
16
"k8s.io/apiserver/pkg/util/flag"
18
17
"k8s.io/kubernetes/pkg/master/ports"
19
18
"k8s.io/kubernetes/pkg/registry/core/service/ipallocator"
@@ -24,8 +23,6 @@ import (
24
23
configapiv1 "github.com/openshift/origin/pkg/cmd/server/api/v1"
25
24
"github.com/openshift/origin/pkg/cmd/server/bootstrappolicy"
26
25
cmdutil "github.com/openshift/origin/pkg/cmd/util"
27
- imagepolicyapi "github.com/openshift/origin/pkg/image/admission/imagepolicy/api"
28
- "github.com/openshift/origin/pkg/oc/bootstrap"
29
26
"github.com/spf13/cobra"
30
27
)
31
28
@@ -362,23 +359,6 @@ func (args MasterArgs) BuildSerializeableMasterConfig() (*configapi.MasterConfig
362
359
config .ServiceAccountConfig .PublicKeyFiles = []string {}
363
360
}
364
361
365
- // embed a default policy for generated config
366
- defaultImagePolicy , err := bootstrap .Asset ("pkg/image/admission/imagepolicy/api/v1/default-policy.yaml" )
367
- if err != nil {
368
- return nil , fmt .Errorf ("unable to find default image admission policy: %v" , err )
369
- }
370
- // TODO: this should not be necessary, runtime.Unknown#MarshalJSON should handle YAML content type correctly
371
- defaultImagePolicy , err = yaml .ToJSON (defaultImagePolicy )
372
- if err != nil {
373
- return nil , err
374
- }
375
- if config .AdmissionConfig .PluginConfig == nil {
376
- config .AdmissionConfig .PluginConfig = make (map [string ]configapi.AdmissionPluginConfig )
377
- }
378
- config .AdmissionConfig .PluginConfig [imagepolicyapi .PluginName ] = configapi.AdmissionPluginConfig {
379
- Configuration : & runtime.Unknown {Raw : defaultImagePolicy },
380
- }
381
-
382
362
internal , err := applyDefaults (config , configapiv1 .SchemeGroupVersion )
383
363
if err != nil {
384
364
return nil , err
0 commit comments