Skip to content

Commit c27ebca

Browse files
committed
stop adding beta admission config to default master configs
1 parent 0e2def7 commit c27ebca

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

pkg/cmd/server/start/master_args.go

-20
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"k8s.io/apimachinery/pkg/runtime"
1414
"k8s.io/apimachinery/pkg/runtime/schema"
1515
"k8s.io/apimachinery/pkg/util/sets"
16-
"k8s.io/apimachinery/pkg/util/yaml"
1716
"k8s.io/apiserver/pkg/util/flag"
1817
"k8s.io/kubernetes/pkg/master/ports"
1918
"k8s.io/kubernetes/pkg/registry/core/service/ipallocator"
@@ -24,8 +23,6 @@ import (
2423
configapiv1 "github.com/openshift/origin/pkg/cmd/server/api/v1"
2524
"github.com/openshift/origin/pkg/cmd/server/bootstrappolicy"
2625
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"
2926
"github.com/spf13/cobra"
3027
)
3128

@@ -362,23 +359,6 @@ func (args MasterArgs) BuildSerializeableMasterConfig() (*configapi.MasterConfig
362359
config.ServiceAccountConfig.PublicKeyFiles = []string{}
363360
}
364361

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-
382362
internal, err := applyDefaults(config, configapiv1.SchemeGroupVersion)
383363
if err != nil {
384364
return nil, err

0 commit comments

Comments
 (0)