Unverified Commit 34bf1160 authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub

Merge pull request #68417 from MikeSpreitzer/sample-apiserver-admission-fixes

Fixed registration of the BanFlunder admission plugin
parents e03886c3 a5a88851
......@@ -90,13 +90,16 @@ func (o WardleServerOptions) Validate(args []string) error {
}
func (o *WardleServerOptions) Complete() error {
// register admission plugins
banflunder.Register(o.RecommendedOptions.Admission.Plugins)
// add admisison plugins to the RecommendedPluginOrder
o.RecommendedOptions.Admission.RecommendedPluginOrder = append(o.RecommendedOptions.Admission.RecommendedPluginOrder, "BanFlunder")
return nil
}
func (o *WardleServerOptions) Config() (*apiserver.Config, error) {
// register admission plugins
banflunder.Register(o.RecommendedOptions.Admission.Plugins)
// TODO have a "real" external address
if err := o.RecommendedOptions.SecureServing.MaybeDefaultWithSelfSignedCerts("localhost", nil, []net.IP{net.ParseIP("127.0.0.1")}); err != nil {
return nil, fmt.Errorf("error creating self-signed certificates: %v", err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment